Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2019-01-17 19:12:49 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2019-01-17 19:12:49 +0300
commit461087746fd544521f945e3b7b9c5c4a05725c0f (patch)
treeb19b063df51bf24bbfe36dcfbc2de1a8a5177b4d
parent9450f27a2a40e77dd1c999a7ec7bf6e9d31d1763 (diff)
10.1.0 releasev10.1.0
Former-commit-id: 336e02cecf60bff46e35d532d9d6ecd6e2fff00e
-rw-r--r--ChangeLog4
-rw-r--r--VERSION2
-rw-r--r--src/main/java/com/mxgraph/online/MSGraphAuthServlet.java230
-rw-r--r--src/main/webapp/WEB-INF/appengine-web.xml2
-rw-r--r--src/main/webapp/WEB-INF/msgraph_client_id1
-rw-r--r--src/main/webapp/WEB-INF/msgraph_client_secret1
-rw-r--r--src/main/webapp/WEB-INF/msgraph_dev_client_id1
-rw-r--r--src/main/webapp/WEB-INF/msgraph_dev_client_secret2
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/js/app.min.js1210
-rw-r--r--src/main/webapp/js/atlas-viewer.min.js1244
-rw-r--r--src/main/webapp/js/atlas.min.js1492
-rw-r--r--src/main/webapp/js/diagramly/App.js9
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js80
-rw-r--r--src/main/webapp/js/diagramly/DrawioClient.js21
-rw-r--r--src/main/webapp/js/diagramly/DrawioFile.js128
-rw-r--r--src/main/webapp/js/diagramly/DrawioFileSync.js2
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js15
-rw-r--r--src/main/webapp/js/diagramly/Menus.js61
-rw-r--r--src/main/webapp/js/diagramly/OneDriveClient.js562
-rw-r--r--src/main/webapp/js/diagramly/vsdx/VsdxExport.js16
-rw-r--r--src/main/webapp/js/embed-static.min.js247
-rw-r--r--src/main/webapp/js/extensions.min.js14
-rw-r--r--src/main/webapp/js/mxgraph/Shapes.js281
-rw-r--r--src/main/webapp/js/reader.min.js247
-rw-r--r--src/main/webapp/js/shapes.min.js90
-rw-r--r--src/main/webapp/js/viewer.min.js1244
-rw-r--r--src/main/webapp/shapes/mxArrows.js515
28 files changed, 4525 insertions, 3198 deletions
diff --git a/ChangeLog b/ChangeLog
index de40bd66..d981ad86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+17-JAN-2019: 10.1.0
+
+- Adds auth token refresh for OneDrive
+
16-JAN-2019: 10.0.43
- Fixes possible NPE in hashValue
diff --git a/VERSION b/VERSION
index 56ed4919..3b9bddfc 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-10.0.43 \ No newline at end of file
+10.1.0 \ No newline at end of file
diff --git a/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java b/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java
index fd829030..51c640d9 100644
--- a/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java
+++ b/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java
@@ -20,32 +20,56 @@ import javax.servlet.http.HttpServletResponse;
@SuppressWarnings("serial")
public class MSGraphAuthServlet extends HttpServlet
{
- public static final String DEV_CLIENT_ID = "c36dee60-2c6d-4b5f-b552-a7d21798ea52";
- public static final String CLIENT_ID = "45c10911-200f-4e27-a666-9e9fca147395";
-
- public static final String DEV_REDIRECT_URI = "https://test.draw.io/microsoft";
- public static final String REDIRECT_URI = "https://www.draw.io/microsoft";
/**
- * Path component under war/ to locate development client secret file.
+ *
*/
public static final String DEV_CLIENT_SECRET_FILE_PATH = "/WEB-INF/msgraph_dev_client_secret";
+ /**
+ *
+ */
+ private static String DEV_CLIENT_SECRET = null;
/**
- * Path component under war/ to locate client secret file.
+ *
*/
public static final String CLIENT_SECRET_FILE_PATH = "/WEB-INF/msgraph_client_secret";
/**
*
*/
- private static String DEV_CLIENT_SECRET = null;
+ private static String CLIENT_SECRET = null;
/**
*
*/
- private static String CLIENT_SECRET = null;
+ public static final String DEV_CLIENT_ID_FILE_PATH = "/WEB-INF/msgraph_dev_client_id";
+
+ /**
+ *
+ */
+ private static String DEV_CLIENT_ID = null;
+
+ /**
+ *
+ */
+ public static final String CLIENT_ID_FILE_PATH = "/WEB-INF/msgraph_client_id";
+
+ /**
+ *
+ */
+ private static String CLIENT_ID = null;
+
+ /**
+ *
+ */
+ public static final String DEV_REDIRECT_URI = "https://test.draw.io/microsoft";
+
+ /**
+ *
+ */
+ public static final String REDIRECT_URI = "https://www.draw.io/microsoft";
/**
* @see HttpServlet#HttpServlet()
@@ -89,6 +113,36 @@ public class MSGraphAuthServlet extends HttpServlet
throw new RuntimeException("Client secret path invalid.");
}
}
+
+ if (DEV_CLIENT_ID == null)
+ {
+ try
+ {
+ DEV_CLIENT_ID = Utils
+ .readInputStream(getServletContext()
+ .getResourceAsStream(DEV_CLIENT_ID_FILE_PATH))
+ .replaceAll("\n", "");
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Dev client ID invalid.");
+ }
+ }
+
+ if (CLIENT_ID == null)
+ {
+ try
+ {
+ CLIENT_ID = Utils
+ .readInputStream(getServletContext()
+ .getResourceAsStream(CLIENT_ID_FILE_PATH))
+ .replaceAll("\n", "");
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Client ID invalid.");
+ }
+ }
}
/**
@@ -123,82 +177,100 @@ public class MSGraphAuthServlet extends HttpServlet
}
else
{
- String url = "https://login.microsoftonline.com/common/oauth2/v2.0/token";
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- con.setRequestMethod("POST");
- con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
-
- boolean jsonResponse = false;
- StringBuilder urlParameters = new StringBuilder();
-
- urlParameters.append("client_id=");
- urlParameters.append(client);
- urlParameters.append("&redirect_uri=");
- urlParameters.append(redirectUri);
- urlParameters.append("&client_secret=");
- urlParameters.append(secret);
-
- if (code != null)
- {
- urlParameters.append("&code=");
- urlParameters.append(code);
- urlParameters.append("&grant_type=authorization_code");
- }
- else
- {
- urlParameters.append("&refresh_token=");
- urlParameters.append(refreshToken);
- urlParameters.append("&grant_type=refresh_token");
- jsonResponse = true;
- }
-
- // Send post request
- con.setDoOutput(true);
- DataOutputStream wr = new DataOutputStream(con.getOutputStream());
- wr.writeBytes(urlParameters.toString());
- wr.flush();
- wr.close();
-
- BufferedReader in = new BufferedReader(
- new InputStreamReader(con.getInputStream()));
- String inputLine;
- StringBuffer res = new StringBuffer();
-
- //Call the opener callback function directly with the given json
- if (!jsonResponse)
+ try
{
- res.append("<!DOCTYPE html><html><head><script>");
- res.append("if (window.opener != null && window.opener.onOneDriveCallback != null)");
- res.append("{");
- res.append(" window.opener.onOneDriveCallback("); //The following is a json containing access_token and redresh_token
+ String url = "https://login.microsoftonline.com/common/oauth2/v2.0/token";
+ URL obj = new URL(url);
+ HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+
+ con.setRequestMethod("POST");
+ con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+
+ boolean jsonResponse = false;
+ StringBuilder urlParameters = new StringBuilder();
+
+ urlParameters.append("client_id=");
+ urlParameters.append(client);
+ urlParameters.append("&redirect_uri=");
+ urlParameters.append(redirectUri);
+ urlParameters.append("&client_secret=");
+ urlParameters.append(secret);
+
+ if (code != null)
+ {
+ urlParameters.append("&code=");
+ urlParameters.append(code);
+ urlParameters.append("&grant_type=authorization_code");
+ }
+ else
+ {
+ urlParameters.append("&refresh_token=");
+ urlParameters.append(refreshToken);
+ urlParameters.append("&grant_type=refresh_token");
+ jsonResponse = true;
+ }
+
+ // Send post request
+ con.setDoOutput(true);
+ DataOutputStream wr = new DataOutputStream(con.getOutputStream());
+ wr.writeBytes(urlParameters.toString());
+ wr.flush();
+ wr.close();
+
+ BufferedReader in = new BufferedReader(
+ new InputStreamReader(con.getInputStream()));
+ String inputLine;
+ StringBuffer res = new StringBuffer();
+
+ //Call the opener callback function directly with the given json
+ if (!jsonResponse)
+ {
+ res.append("<!DOCTYPE html><html><head><script>");
+ res.append("if (window.opener != null && window.opener.onOneDriveCallback != null)");
+ res.append("{");
+ res.append(" window.opener.onOneDriveCallback("); //The following is a json containing access_token and redresh_token
+ }
+
+ while ((inputLine = in.readLine()) != null)
+ {
+ res.append(inputLine);
+ }
+ in.close();
+
+ if (!jsonResponse)
+ {
+ res.append(" , window);");
+ res.append("}");
+ res.append("</script></head><body></body></html>");
+ }
+
+ response.setStatus(con.getResponseCode());
+
+ OutputStream out = response.getOutputStream();
+
+ PrintWriter writer = new PrintWriter(out);
+
+ // Writes JavaScript code
+ writer.println(res.toString());
+
+ writer.flush();
+ writer.close();
}
-
- while ((inputLine = in.readLine()) != null)
+ catch(IOException e)
{
- res.append(inputLine);
+ if (e.getMessage().contains("401"))
+ {
+ response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
+ }
+ else
+ {
+ response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ }
}
- in.close();
-
- if (!jsonResponse)
+ catch (Exception e)
{
- res.append(" , window);");
- res.append("}");
- res.append("</script></head><body></body></html>");
+ response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
-
- response.setStatus(con.getResponseCode());
-
- OutputStream out = response.getOutputStream();
-
- PrintWriter writer = new PrintWriter(out);
-
- // Writes JavaScript code
- writer.println(res.toString());
-
- writer.flush();
- writer.close();
}
}
diff --git a/src/main/webapp/WEB-INF/appengine-web.xml b/src/main/webapp/WEB-INF/appengine-web.xml
index 745206f8..13ada6aa 100644
--- a/src/main/webapp/WEB-INF/appengine-web.xml
+++ b/src/main/webapp/WEB-INF/appengine-web.xml
@@ -17,7 +17,7 @@
</include>
</static-files>
- <instance-class>F2</instance-class>
+ <instance-class>F1</instance-class>
<automatic-scaling>
<min-idle-instances>1</min-idle-instances>
<max-idle-instances>1</max-idle-instances>
diff --git a/src/main/webapp/WEB-INF/msgraph_client_id b/src/main/webapp/WEB-INF/msgraph_client_id
new file mode 100644
index 00000000..df8d0c78
--- /dev/null
+++ b/src/main/webapp/WEB-INF/msgraph_client_id
@@ -0,0 +1 @@
+Replace_with_your_own_microsoft_graph_client_id \ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/msgraph_client_secret b/src/main/webapp/WEB-INF/msgraph_client_secret
index e69de29b..571aeb01 100644
--- a/src/main/webapp/WEB-INF/msgraph_client_secret
+++ b/src/main/webapp/WEB-INF/msgraph_client_secret
@@ -0,0 +1 @@
+Replace_with_your_own_microsoft_graph_client_secret \ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/msgraph_dev_client_id b/src/main/webapp/WEB-INF/msgraph_dev_client_id
new file mode 100644
index 00000000..df8d0c78
--- /dev/null
+++ b/src/main/webapp/WEB-INF/msgraph_dev_client_id
@@ -0,0 +1 @@
+Replace_with_your_own_microsoft_graph_client_id \ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/msgraph_dev_client_secret b/src/main/webapp/WEB-INF/msgraph_dev_client_secret
index 2fc264ff..571aeb01 100644
--- a/src/main/webapp/WEB-INF/msgraph_dev_client_secret
+++ b/src/main/webapp/WEB-INF/msgraph_dev_client_secret
@@ -1 +1 @@
-paFCJ4371-^cdthoVFCF1^= \ No newline at end of file
+Replace_with_your_own_microsoft_graph_client_secret \ No newline at end of file
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 6854dcc8..85a984e3 100644
--- a/src/main/webapp/cache.manifest
+++ b/src/main/webapp/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 01/16/2019 04:40 PM
+# 01/17/2019 04:16 PM
app.html
index.html?offline=1
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 1f3a15ca..fa459aca 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -2067,9 +2067,9 @@ d.height==c.format.height?(g.value=c.key,e.setAttribute("checked","checked"),e.d
g.value="custom",k.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var k=document.createElement("div");k.style.marginLeft="4px";k.style.width="210px";
k.style.height="24px";e.style.marginRight="6px";k.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);h.style.marginLeft="10px";h.style.marginRight="6px";k.appendChild(h);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));k.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");
p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var u={},q=PageSetupDialog.getFormats(),r=0;r<q.length;r++){var t=q[r];u[t.key]=t;var w=document.createElement("option");w.setAttribute("value",t.key);mxUtils.write(w,t.title);g.appendChild(w)}var v=!1;f();a.appendChild(g);mxUtils.br(a);
-a.appendChild(k);a.appendChild(m);var y=d,x=function(a,c){var e=u[g.value];null!=e.format?(p.value=e.format.width/100,n.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.width/100;e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,
-e.height,e.width));c&&v||e.width==y.width&&e.height==y.height||(y=e,null!=b&&b(y))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){v="custom"==g.value;
-x(a,!0)});x();return{set:function(a){d=a;f(null,null,!0)},get:function(){return y},widthInput:p,heightInput:n}};
+a.appendChild(k);a.appendChild(m);var z=d,x=function(a,c){var e=u[g.value];null!=e.format?(p.value=e.format.width/100,n.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.width/100;e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,
+e.height,e.width));c&&v||e.width==z.width&&e.height==z.height||(z=e,null!=b&&b(z))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){v="custom"==g.value;
+x(a,!0)});x();return{set:function(a){d=a;f(null,null,!0)},get:function(){return z},widthInput:p,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
@@ -2080,8 +2080,8 @@ d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.
b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var g=e*b;d.push("M 0 "+g+" L "+c+" "+g+" M "+g+" 0 L "+g+" "+c)}return'<svg width="'+
c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=
this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,g=this.pageFormat,f=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=
-new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,v=h.x+b,y=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
-new mxPoint(Math.round(v),Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(y))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,v=h.x+b,z=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
+new mxPoint(Math.round(v),Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var g=this.graph.getCellGeometry(b[e]);if(null!=g&&g.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?
!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),h=Math.floor(Math.min(0,
c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+h*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-h)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
@@ -2098,14 +2098,14 @@ function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent()
var l=!1,m=null,p=null,n=null,u=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var e=0;e<n.length;e++)this.toolbar.container.appendChild(n[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=
p}l=b.cellEditor.isContentEditing();m=a;p=d;n=c}}),q=this,r=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){r.apply(this,arguments);u();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=q.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=
d.substring(0,d.length-1));q.toolbar.setFontName(d);q.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var t=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);u()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";
-if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(B){}var w=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],e=[],f;for(f in c.style)a[f]!=c.style[f]&&(d.push(c.style[f]),e.push(f));f=b.getModel().getStyle(c.cell);for(var g=null!=f?f.split(";"):[],h=0;h<g.length;h++){var k=g[h],
+if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(C){}var w=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],e=[],f;for(f in c.style)a[f]!=c.style[f]&&(d.push(c.style[f]),e.push(f));f=b.getModel().getStyle(c.cell);for(var g=null!=f?f.split(";"):[],h=0;h<g.length;h++){var k=g[h],
l=k.indexOf("=");0<=l&&(f=k.substring(0,l),k=k.substring(l+1),null!=a[f]&&"none"==k&&(d.push(k),e.push(f)))}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",d,"cells",[c.cell]))}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=
-["fontFamily","fontSize","fontColor"],E="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)v.push(C[a][c]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(v,y[a])&&v.push(y[a]);
-var D=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],A=v.slice(),g=0;g<m.length;g++){var p=m[g],z=p.indexOf("=");if(0<=z){var n=p.substring(0,z),T=mxUtils.indexOf(A,n);0<=T&&A.splice(T,1);for(var q=0;q<C.length;q++){var u=C[q];if(0<=
-mxUtils.indexOf(u,n))for(var t=0;t<u.length;t++){var r=mxUtils.indexOf(A,u[t]);0<=r&&A.splice(r,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,B=d.getStyle(k),g=0;g<A.length;g++){var n=A[g],w=f[n];null==w||"shape"==n&&!e||e&&!(0>mxUtils.indexOf(y,n))||(B=mxUtils.setStyle(B,n,w))}d.setStyle(k,B)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){D(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));D(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=
-h[g])if(0<=mxUtils.indexOf(y,d[g]))f||0<=mxUtils.indexOf(E,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(v,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(v,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(E,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
+["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)v.push(D[a][c]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(v,z[a])&&v.push(z[a]);
+var E=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],B=v.slice(),g=0;g<m.length;g++){var p=m[g],A=p.indexOf("=");if(0<=A){var n=p.substring(0,A),U=mxUtils.indexOf(B,n);0<=U&&B.splice(U,1);for(var q=0;q<D.length;q++){var u=D[q];if(0<=
+mxUtils.indexOf(u,n))for(var t=0;t<u.length;t++){var r=mxUtils.indexOf(B,u[t]);0<=r&&B.splice(r,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,C=d.getStyle(k),g=0;g<B.length;g++){var n=B[g],w=f[n];null==w||"shape"==n&&!e||e&&!(0>mxUtils.indexOf(z,n))||(C=mxUtils.setStyle(C,n,w))}d.setStyle(k,C)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){E(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));E(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=
+h[g])if(0<=mxUtils.indexOf(z,d[g]))f||0<=mxUtils.indexOf(F,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(v,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(v,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(F,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(b.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
@@ -2128,8 +2128,8 @@ EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipb
!1,null):d=b.apply(this,arguments);a.updatePasteActionStates();return d};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var e=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){e.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,
this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container){d=null!=d?d:0;e=null!=e?e:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(g);
-l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,p=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var n=a.container.offsetWidth-p,p=a.container.offsetHeight-p;b=b?Math.max(.3,Math.min(c||1,n/l.width)):k;c=(n-b*l.width)/2/b;var A=0==this.lightboxVerticalDivider?0:(p-b*l.height)/this.lightboxVerticalDivider/b;f&&(c=Math.max(c,0),A=Math.max(A,0));if(f||g.width<n||g.height<p)a.view.scaleAndTranslate(b,
-Math.floor(c-l.x),Math.floor(A-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/k),Math.floor(g.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
+l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,p=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var n=a.container.offsetWidth-p,p=a.container.offsetHeight-p;b=b?Math.max(.3,Math.min(c||1,n/l.width)):k;c=(n-b*l.width)/2/b;var B=0==this.lightboxVerticalDivider?0:(p-b*l.height)/this.lightboxVerticalDivider/b;f&&(c=Math.max(c,0),B=Math.max(B,0));if(f||g.width<n||g.height<p)a.view.scaleAndTranslate(b,
+Math.floor(c-l.x),Math.floor(B-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/k),Math.floor(g.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace=
"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var f=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||
0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",f);f();var e=0,f=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);
@@ -2144,12 +2144,12 @@ mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px
this.lightboxToolbarActions[m];f(w.fn,w.icon,w.tooltip)}!a.lightbox||"1"!=urlParams.close&&this.container==document.body||f(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?
"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||q(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():q(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():q(100);mxEvent.consume(a)}));
mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-
-a.container.scrollTop)<v&&Math.abs(this.startX-c.getGraphX())<v&&Math.abs(this.startY-c.getGraphY())<v&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?u():q(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=
-a.y-(this.y0||0)*b.height}y.apply(this,arguments)};var x=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),g=Math.ceil(2*c.y+b.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=e||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,e,g);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==
-c?x.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var E=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
+a.container.scrollTop)<v&&Math.abs(this.startX-c.getGraphX())<v&&Math.abs(this.startY-c.getGraphY())<v&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?u():q(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=
+a.y-(this.y0||0)*b.height}z.apply(this,arguments)};var x=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),g=Math.ceil(2*c.y+b.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=e||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,e,g);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==
+c?x.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var F=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var b=mxUtils.getOffset(a.container),e=0,g=0;null!=E&&(e=a.container.offsetWidth/2-E.x+b.x,g=a.container.offsetHeight/2-E.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&d.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),g*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==g||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-
-1),a.container.scrollTop-=g*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(b))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){E=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);break}d=d.parentNode}}))};
+this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var b=mxUtils.getOffset(a.container),e=0,g=0;null!=F&&(e=a.container.offsetWidth/2-F.x+b.x,g=a.container.offsetHeight/2-F.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&d.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),g*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==g||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-
+1),a.container.scrollTop-=g*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(b))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){F=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);break}d=d.parentNode}}))};
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
@@ -2372,36 +2372,36 @@ Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUt
f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&f.isSplitTarget(h,a,e)){var p=f.cloneCells(a);f.splitEdge(h,p,null,g-b.width/2,k-b.height/2);m=p}else 0<a.length&&(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var n=f.layoutManager.getLayout(h);if(null!=n){var u=f.view.scale,q=f.view.translate,r=(g+q.x)*u,t=(k+q.y)*u;for(h=0;h<m.length;h++)n.moveCell(m[h],r,t)}}d&&f.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(w){this.editorUi.handleError(w)}finally{f.model.endUpdate()}null!=
m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m));f.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=m&&1==m.length&&window.setTimeout(function(){f.startEditing(m[0])},0)}}mxEvent.consume(e)}})};Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d};
Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),h=[];if(null!=e){var g=this.editorUi.editor.graph,k=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),p=g.model.getParent(a),n=!0;if(null!=g.layoutManager){var u=g.layoutManager.getLayout(p);if(null!=u&&u.constructor==mxStackLayout&&(n=!1,h=g.view.getState(p),null!=h)){var q=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+=
-q.x;e.y+=q.y;var r=e.getTerminalPoint(!1);null!=r&&(r.x+=q.x,r.y+=q.y)}}var t=m.x,w=m.y;g.model.isEdge(c[b])&&(w=t=0);var v=g.model.isEdge(a)||null!=l&&!l.relative&&n,h=c=g.importCells(c,e.x-(v?t:0),e.y-(v?w:0),v?p:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var y=g.getCellGeometry(c[b]);y.points=null;if(null!=y.getTerminalPoint(!1))y.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(v&&g.model.isVertex(p)){var x=
+q.x;e.y+=q.y;var r=e.getTerminalPoint(!1);null!=r&&(r.x+=q.x,r.y+=q.y)}}var t=m.x,w=m.y;g.model.isEdge(c[b])&&(w=t=0);var v=g.model.isEdge(a)||null!=l&&!l.relative&&n,h=c=g.importCells(c,e.x-(v?t:0),e.y-(v?w:0),v?p:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var z=g.getCellGeometry(c[b]);z.points=null;if(null!=z.getTerminalPoint(!1))z.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(v&&g.model.isVertex(p)){var x=
g.view.getState(p),q=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,q.x,q.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),t=e.x-Math.round(m.x),w=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,t,w,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));g.fireEvent(new mxEventObject("cellsInserted",
-"cells",c))}catch(E){this.editorUi.handleError(E)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h};
+"cells",c))}catch(F){this.editorUi.handleError(F)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h};
Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,h=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a),
g=g.clone(),g.x=(a.x-e.translate.x)/e.scale,g.y=(a.y-e.translate.y)/e.scale),e=f.defaultEdgeLength,f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),f=b.getTerminalPoint(!1),e=f.x-c.x,c=f.y-c.y,e=Math.sqrt(e*e+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=e,b.y=g.y-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=e,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+
b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=e,b.y=g.y+g.height,b.setTerminalPoint(new mxPoint(b.x,b.y+b.height),!1)):d==mxConstants.DIRECTION_WEST&&(b.width=e,b.x=g.x-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1))):(!h&&45<b.width&&45<b.height&&45<g.width&&45<g.height&&(b.width*=g.height/b.height,b.height=g.height),b.x=g.x+g.width/2-b.width/2,b.y=g.y+g.height/2-b.height/2,d==mxConstants.DIRECTION_NORTH?b.y=b.y-g.height/2-b.height/2-e:d==mxConstants.DIRECTION_EAST?b.x=b.x+g.width/2+
b.width/2+e:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+g.height/2+b.height/2+e:d==mxConstants.DIRECTION_WEST&&(b.x=b.x-g.width/2-b.width/2-e),f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(g=f.getCellGeometry(c.getTerminal(!1)),null!=g&&(d==mxConstants.DIRECTION_NORTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()+g.height/2):d==mxConstants.DIRECTION_EAST?(b.x-=g.getCenterX()-g.width/2,b.y-=g.getCenterY()):d==mxConstants.DIRECTION_SOUTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()-g.height/
2):d==mxConstants.DIRECTION_WEST&&(b.x-=g.getCenterX()+g.width/2,b.y-=g.getCenterY()))))));return b};
Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),F=d):mxUtils.setOpacity(d,d==D?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,p=this,n=0;n<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[n])?
-m=n:null==l&&this.editorUi.editor.graph.model.isEdge(b[n])&&null==this.editorUi.editor.graph.model.getTerminal(b[n],!0)&&(l=n),null==m||null==l);n++);var u=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=w&&F==D){var h=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],h=this.updateShapes(a.model.isEdge(w.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=F&&null!=
-r&&F!=D?(h=a.model.isEdge(r.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(r.cell,b,I,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var q=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),q.apply(this,arguments))};var r=null,t=null,w=null,v=!1,
-y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),E=e(this.triangleDown,mxResources.get("connect")),C=e(this.triangleLeft,mxResources.get("connect")),D=e(this.refreshTarget,mxResources.get("replace")),B=null,M=e(this.roundDrop),L=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,F=null,J=u.createPreviewElement;u.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width;
-this.previewElementHeight=b.style.height;return b};var O=u.dragEnter;u.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");O.apply(this,arguments)};var Q=u.dragExit;u.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};u.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=F&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=w&&F==D)this.previewElement.style.display=
-a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=r&&null!=F){var e=a.model.isEdge(r.cell)||null==l?m:l,g=p.getDropAndConnectGeometry(r.cell,b[e],I,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),A=a.model.getParent(r.cell),z=d.translate.x*d.scale,G=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(A)&&
-A!=d.currentRoot&&(G=d.getState(A),z=G.x,G=G.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+z+"px";this.previewElement.style.top=(g.y-k)*d.scale+G+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
-f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var P=(new Date).getTime(),H=0,A=null,G=this.editorUi.editor.graph.getCellStyle(b[0]);u.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
-this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=F=null;A!=k?(A=k,P=(new Date).getTime(),H=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==F&&(A=k,u.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):H=(new Date).getTime()-P;if(2500>H&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
-mxUtils.getValue(G,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(G,mxConstants.STYLE_SHAPE)||1500<H||a.model.isEdge(k.cell))&&H>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){w=
-k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);D.style.left=Math.floor(l.x)+"px";D.style.top=Math.floor(l.y)+"px";null==B&&(a.container.appendChild(D),B=D.parentNode);h(c,d,l,D)}else null==w||!mxUtils.contains(w,c,d)||1500<H&&!mxEvent.isShiftDown(e)?(w=null,null!=B&&(D.parentNode.removeChild(D),B=null)):null!=w&&null!=B&&
-(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,D));if(v&&null!=r&&!mxEvent.isAltDown(e)&&null==F){f=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var z=r.absolutePoints;null!=M.parentNode&&(l=z[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),
-M)));null!=L.parentNode&&(z=z[z.length-1],f.add(h(c,d,new mxRectangle(z.x-this.roundDrop.width/2,z.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(r.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,
-l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&"hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),y)),f.add(h(c,d,new mxRectangle(l.x+l.width,r.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),
-x)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),E)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,r.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),C));null!=f&&f.grow(10)}I=mxConstants.DIRECTION_NORTH;F==x?I=mxConstants.DIRECTION_EAST:F==E||F==L?I=mxConstants.DIRECTION_SOUTH:F==C&&(I=mxConstants.DIRECTION_WEST);null!=w&&F==D&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&
-(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=r&&5E3<=H||r!=k&&(null==f||!mxUtils.contains(f,c,d)||500<H&&null==F&&l))if(v=!1,r=5E3>H&&H>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=r&&l){f=[M,L,y,x,E,C];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(z=k.absolutePoints,null!=z&&(l=z[0],z=z[z.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),M.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",
-M.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",L.style.left=Math.floor(z.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(z.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(M),null==a.model.getTerminal(g,!1)&&a.container.appendChild(L))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(k.cell),
-null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&"hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),y.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",y.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=
-Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",E.style.left=y.style.left,E.style.top=Math.floor(l.y+l.height)+"px",C.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",C.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(y),a.container.appendChild(E)),a.container.appendChild(x),a.container.appendChild(C));null!=k&&(t=a.selectionCellsHandler.getHandler(k.cell),null!=t&&null!=t.setHandlesVisible&&t.setHandlesVisible(!1));v=!0}else for(f=[M,L,y,x,E,C],
-l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);v||null==t||t.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=w&&F==D?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=F||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g=
-null}return g});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[M,L,D,y,x,E,C],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=r&&null!=t&&t.reset();F=B=w=r=t=null};return u};
+"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),G=d):mxUtils.setOpacity(d,d==E?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,p=this,n=0;n<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[n])?
+m=n:null==l&&this.editorUi.editor.graph.model.isEdge(b[n])&&null==this.editorUi.editor.graph.model.getTerminal(b[n],!0)&&(l=n),null==m||null==l);n++);var u=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=w&&G==E){var h=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],h=this.updateShapes(a.model.isEdge(w.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=G&&null!=
+r&&G!=E?(h=a.model.isEdge(r.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(r.cell,b,J,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var q=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),q.apply(this,arguments))};var r=null,t=null,w=null,v=!1,
+z=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),F=e(this.triangleDown,mxResources.get("connect")),D=e(this.triangleLeft,mxResources.get("connect")),E=e(this.refreshTarget,mxResources.get("replace")),C=null,M=e(this.roundDrop),L=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,G=null,K=u.createPreviewElement;u.createPreviewElement=function(a){var b=K.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width;
+this.previewElementHeight=b.style.height;return b};var O=u.dragEnter;u.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");O.apply(this,arguments)};var Q=u.dragExit;u.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};u.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=G&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=w&&G==E)this.previewElement.style.display=
+a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=r&&null!=G){var e=a.model.isEdge(r.cell)||null==l?m:l,g=p.getDropAndConnectGeometry(r.cell,b[e],J,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),B=a.model.getParent(r.cell),A=d.translate.x*d.scale,H=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(B)&&
+B!=d.currentRoot&&(H=d.getState(B),A=H.x,H=H.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+A+"px";this.previewElement.style.top=(g.y-k)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
+f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var P=(new Date).getTime(),I=0,B=null,H=this.editorUi.editor.graph.getCellStyle(b[0]);u.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
+this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=G=null;B!=k?(B=k,P=(new Date).getTime(),I=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==G&&(B=k,u.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):I=(new Date).getTime()-P;if(2500>I&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
+mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||1500<I||a.model.isEdge(k.cell))&&I>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){w=
+k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);E.style.left=Math.floor(l.x)+"px";E.style.top=Math.floor(l.y)+"px";null==C&&(a.container.appendChild(E),C=E.parentNode);h(c,d,l,E)}else null==w||!mxUtils.contains(w,c,d)||1500<I&&!mxEvent.isShiftDown(e)?(w=null,null!=C&&(E.parentNode.removeChild(E),C=null)):null!=w&&null!=C&&
+(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,E));if(v&&null!=r&&!mxEvent.isAltDown(e)&&null==G){f=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var A=r.absolutePoints;null!=M.parentNode&&(l=A[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),
+M)));null!=L.parentNode&&(A=A[A.length-1],f.add(h(c,d,new mxRectangle(A.x-this.roundDrop.width/2,A.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),A=this.graph.selectionCellsHandler.getHandler(r.cell),null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,
+l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),z)),f.add(h(c,d,new mxRectangle(l.x+l.width,r.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),
+x)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),F)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,r.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),D));null!=f&&f.grow(10)}J=mxConstants.DIRECTION_NORTH;G==x?J=mxConstants.DIRECTION_EAST:G==F||G==L?J=mxConstants.DIRECTION_SOUTH:G==D&&(J=mxConstants.DIRECTION_WEST);null!=w&&G==E&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&
+(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=r&&5E3<=I||r!=k&&(null==f||!mxUtils.contains(f,c,d)||500<I&&null==G&&l))if(v=!1,r=5E3>I&&I>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=r&&l){f=[M,L,z,x,F,D];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(A=k.absolutePoints,null!=A&&(l=A[0],A=A[A.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),M.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",
+M.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",L.style.left=Math.floor(A.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(A.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(M),null==a.model.getTerminal(g,!1)&&a.container.appendChild(L))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),A=this.graph.selectionCellsHandler.getHandler(k.cell),
+null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),z.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",z.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=
+Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",F.style.left=z.style.left,F.style.top=Math.floor(l.y+l.height)+"px",D.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",D.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(z),a.container.appendChild(F)),a.container.appendChild(x),a.container.appendChild(D));null!=k&&(t=a.selectionCellsHandler.getHandler(k.cell),null!=t&&null!=t.setHandlesVisible&&t.setHandlesVisible(!1));v=!0}else for(f=[M,L,z,x,F,D],
+l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);v||null==t||t.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=w&&G==E?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=G||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g=
+null}return g});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[M,L,E,z,x,F,D],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=r&&null!=t&&t.reset();G=C=w=r=t=null};return u};
Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)){if(1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}}else if(mxEvent.isShiftDown(d)&&!b.isSelectionEmpty())this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell());else{a=b.getFreeInsertPoint();if(mxEvent.isShiftDown(d)){var f=b.getGraphBounds(),e=b.view.translate,h=b.view.scale;a.x=f.x/h-e.x+f.width/h+b.gridSize;a.y=f.y/h-e.y}c.drop(b,d,null,a.x,a.y,!0);null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}};
Sidebar.prototype.addClickHandler=function(a,c,d){var b=c.mouseDown,f=c.mouseMove,e=c.mouseUp,h=this.editorUi.editor.graph.tolerance,g=null,k=this;c.mouseDown=function(c){b.apply(this,arguments);g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=g&&(Math.abs(g.x-mxEvent.getClientX(b))>h||Math.abs(g.y-mxEvent.getClientY(b))>
@@ -2437,13 +2437,13 @@ function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphH
"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);
this.getRubberband=function(){return p};var n=(new Date).getTime(),u=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),u=0):u=(new Date).getTime()-n};var r=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
"outlineConnect","1"))&&r.apply(this,arguments)};var t=this.isToggleEvent;this.isToggleEvent=function(a){return t.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var v=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(v=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=v)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return y.apply(this,
+(v=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=v)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return z.apply(this,
arguments);b=b?a.sourceState.cell:a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&(this.isCustomLink(b)?this.customLinkClicked(b):this.openLink(b)))};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var x=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=
-this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return x.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,g){g=null!=g?g:[];if(0<c||0<d){var f=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=f.getRoot()));if(null!=e)for(var l=f.getChildCount(e),A=0;A<l;A++){var m=f.getChildAt(e,A),z=this.view.getState(m);if(null!=
-z&&this.isCellVisible(m)&&"1"!=mxUtils.getValue(z.style,"locked","0")){var p=mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(z=mxUtils.getBoundingBox(z,p));(f.isEdge(m)||f.isVertex(m))&&z.x>=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&g.push(m);this.getAllCells(a,b,c,d,m,g)}}}return g};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:E.apply(this,arguments)};this.isCellLocked=function(a){for(a=
-this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();C=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=
-b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);C=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var D=this.updateMouseEvent;this.updateMouseEvent=function(a){a=D.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
+this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return x.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,g){g=null!=g?g:[];if(0<c||0<d){var f=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=f.getRoot()));if(null!=e)for(var l=f.getChildCount(e),B=0;B<l;B++){var m=f.getChildAt(e,B),A=this.view.getState(m);if(null!=
+A&&this.isCellVisible(m)&&"1"!=mxUtils.getValue(A.style,"locked","0")){var p=mxUtils.getValue(A.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(A=mxUtils.getBoundingBox(A,p));(f.isEdge(m)||f.isVertex(m))&&A.x>=a&&A.y+A.height<=k&&A.y>=b&&A.x+A.width<=h&&g.push(m);this.getAllCells(a,b,c,d,m,g)}}}return g};var F=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:F.apply(this,arguments)};this.isCellLocked=function(a){for(a=
+this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var D=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();D=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=
+b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=D?this.addSelectionCells(D):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);D=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,c,d){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,c)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
@@ -2540,11 +2540,11 @@ this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,arguments);null!=
d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var g=new mxPoint(c,e);g.type=b;d.push(g);g=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==g||g.type!=b||g.x!=c||g.y!=e},g=.5*this.scale,c=!1,d=[],f=0;f<b.length-1;f++){for(var h=b[f+1],k=b[f],w=[],v=b[f+2];f<
-b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,v.x,v.y,h.x,h.y)<1*this.scale*this.scale;)h=v,f++,v=b[f+2];for(var c=e(0,k.x,k.y)||c,y=0;y<this.validEdges.length;y++){var x=this.validEdges[y],E=x.absolutePoints;if(null!=E&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<E.length-1;x++){for(var C=E[x+1],D=E[x],v=E[x+2];x<E.length-2&&mxUtils.ptSegDistSq(D.x,D.y,v.x,v.y,C.x,C.y)<1*this.scale*this.scale;)C=v,x++,v=E[x+2];v=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,C.x,C.y);if(null!=v&&(Math.abs(v.x-
-D.x)>g||Math.abs(v.y-D.y)>g)&&(Math.abs(v.x-C.x)>g||Math.abs(v.y-C.y)>g)){C=v.x-k.x;D=v.y-k.y;v={distSq:C*C+D*D,x:v.x,y:v.y};for(C=0;C<w.length;C++)if(w[C].distSq>v.distSq){w.splice(C,0,v);v=null;break}null==v||0!=w.length&&w[w.length-1].x===v.x&&w[w.length-1].y===v.y||w.push(v)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}v=b[b.length-1];c=e(0,v.x,v.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=
-null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var v=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var x=
-this.state.routedPoints[y],E=new mxPoint(x.x/this.scale,x.y/this.scale);0==y?E=b[0]:y==this.state.routedPoints.length-1&&(E=b[b.length-1]);var C=!1;if(null!=l&&1==x.type){var D=this.state.routedPoints[y+1],x=D.x/this.scale-E.x,D=D.y/this.scale-E.y,x=x*x+D*D;null==v&&(v=new mxPoint(E.x-l.x,E.y-l.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*e/m,v.y=v.y*e/m);x>e*e&&0<m&&(x=l.x-E.x,D=l.y-E.y,x=x*x+D*D,x>e*e&&(C=new mxPoint(E.x-v.x,E.y-v.y),x=new mxPoint(E.x+v.x,E.y+v.y),h.push(C),this.addPoints(a,h,c,d,!1,
-null,k),h=0>Math.round(v.x)||0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(C.x-v.y*h,C.y+v.x*h),a.lineTo(x.x-v.y*h,x.y+v.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(C.x-v.y*h,C.y+v.x*h,x.x-v.y*h,x.y+v.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],C=!0))}else v=null;C||(h.push(E),l=E)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==
+b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,v.x,v.y,h.x,h.y)<1*this.scale*this.scale;)h=v,f++,v=b[f+2];for(var c=e(0,k.x,k.y)||c,z=0;z<this.validEdges.length;z++){var x=this.validEdges[z],F=x.absolutePoints;if(null!=F&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<F.length-1;x++){for(var D=F[x+1],E=F[x],v=F[x+2];x<F.length-2&&mxUtils.ptSegDistSq(E.x,E.y,v.x,v.y,D.x,D.y)<1*this.scale*this.scale;)D=v,x++,v=F[x+2];v=mxUtils.intersection(k.x,k.y,h.x,h.y,E.x,E.y,D.x,D.y);if(null!=v&&(Math.abs(v.x-
+E.x)>g||Math.abs(v.y-E.y)>g)&&(Math.abs(v.x-D.x)>g||Math.abs(v.y-D.y)>g)){D=v.x-k.x;E=v.y-k.y;v={distSq:D*D+E*E,x:v.x,y:v.y};for(D=0;D<w.length;D++)if(w[D].distSq>v.distSq){w.splice(D,0,v);v=null;break}null==v||0!=w.length&&w[w.length-1].x===v.x&&w[w.length-1].y===v.y||w.push(v)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}v=b[b.length-1];c=e(0,v.x,v.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=
+null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var v=null;a.begin();for(var z=0;z<this.state.routedPoints.length;z++){var x=
+this.state.routedPoints[z],F=new mxPoint(x.x/this.scale,x.y/this.scale);0==z?F=b[0]:z==this.state.routedPoints.length-1&&(F=b[b.length-1]);var D=!1;if(null!=l&&1==x.type){var E=this.state.routedPoints[z+1],x=E.x/this.scale-F.x,E=E.y/this.scale-F.y,x=x*x+E*E;null==v&&(v=new mxPoint(F.x-l.x,F.y-l.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*e/m,v.y=v.y*e/m);x>e*e&&0<m&&(x=l.x-F.x,E=l.y-F.y,x=x*x+E*E,x>e*e&&(D=new mxPoint(F.x-v.x,F.y-v.y),x=new mxPoint(F.x+v.x,F.y+v.y),h.push(D),this.addPoints(a,h,c,d,!1,
+null,k),h=0>Math.round(v.x)||0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(D.x-v.y*h,D.y+v.x*h),a.lineTo(x.x-v.y*h,x.y+v.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(D.x-v.y*h,D.y+v.x*h,x.x-v.y*h,x.y+v.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],D=!0))}else v=null;D||(h.push(F),l=F)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==
a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)e.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var g=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),g=mxUtils.getRotatedPoint(g,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
0);g=this.getPerimeterPoint(b,g,0==h&&f,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),g=mxUtils.getRotatedPoint(g,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,g),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var g=0;g<a.length;g++){var f=this.graph.getConnectionPoint(b,a[g]);if(null!=f){var h=(f.x-e.x)*(f.x-e.x)+(f.y-e.y)*(f.y-e.y);if(null==d||h<d)c=f,d=h}}null!=c&&(e=c)}return e};
var h=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,8))try{var c=
@@ -2565,11 +2565,11 @@ a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error
null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};
Graph.prototype.importGraphModel=function(a,b,c,d){b=null!=b?b:0;c=null!=c?c:0;var e=new mxCodec(a.ownerDocument),g=new mxGraphModel;e.decode(a,g);a=[];e=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges()));if(null!=e){e=e.slice();this.model.beginUpdate();try{if(1!=e.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<e.length;g++)a=a.concat(this.model.getChildren(this.moveCells([e[g]],b,c,!1,this.model.getRoot())[0]));else a=this.moveCells(g.getChildren(e[0]),b,c,!1,this.getDefaultParent());
if(d){this.isGridEnabled()&&(b=this.snap(b),c=this.snap(c));var f=this.getBoundingBoxFromGeometry(a,!0);null!=f&&this.moveCells(a,b-f.x,c-f.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=null;if(null!=a.shape){var d=a.shape.direction,e=a.shape.bounds,g=a.shape.scale,c=e.width/g,e=e.height/g;if(d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH)var f=c,c=e,e=f;c=a.shape.getConstraints(a.style,c,e)}if(null!=c)return c;
-c=mxUtils.getValue(a.style,"points",null);if(null!=c){d=[];try{for(var h=JSON.parse(c),c=0;c<h.length;c++)f=h[c],d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}catch(ia){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),
+c=mxUtils.getValue(a.style,"points",null);if(null!=c){d=[];try{for(var h=JSON.parse(c),c=0;c<h.length;c++)f=h[c],d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}catch(ha){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),
b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};
Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();
-try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var g=b.getTerminal(e,!0),f=b.getTerminal(e,!1);b.setTerminal(e,f,!0);b.setTerminal(e,g,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),A=this.view.getState(g),p=this.view.getState(f);if(null!=m){var n=null!=A?this.getConnectionConstraint(m,A,!0):null,q=
+try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var g=b.getTerminal(e,!0),f=b.getTerminal(e,!1);b.setTerminal(e,f,!0);b.setTerminal(e,g,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),B=this.view.getState(g),p=this.view.getState(f);if(null!=m){var n=null!=B?this.getConnectionConstraint(m,B,!0):null,q=
null!=p?this.getConnectionConstraint(m,p,!1):null;this.setConnectionConstraint(e,g,!0,q);this.setConnectionConstraint(e,f,!1,n)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var u=h.width;h.width=h.height;h.height=u;b.setGeometry(e,h);var r=this.view.getState(e);if(null!=r){var t=r.style[mxConstants.STYLE_DIRECTION]||"east";"east"==t?t="south":"south"==t?t="west":"west"==t?t="north":"north"==t&&(t="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,
t,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=
0;c<b.length;c++){var d=this.view.getState(b[c]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)?this.removeStateForCell(b[c]):this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};
@@ -2597,12 +2597,12 @@ b.length;){for(c=b[0].parentNode;null!=b[0].firstChild;)c.insertBefore(b[0].firs
b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,g=0;g<b.length;g++)if(this.getModel().isVertex(b[g])){var f=this.view.getState(b[g]);if(null!=f){var h=a?f.getCenterX():f.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(f)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});f=this.view.translate;h=this.view.scale;e=e/h-(a?f.x:f.y);d=d/h-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,g=1;g<
c.length-1;g++){var l=this.view.getState(this.model.getParent(c[g].cell)),m=this.getCellGeometry(c[g].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[g].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=
new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var g=this.getCellGeometry(b[d]);null==g||!g.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(g.relative=!1,g.x=e.x/e.view.scale-e.view.translate.x,g.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;g=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(g,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=
-new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,g,f,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;g=null!=g?g:!0;f=null!=f?f:!0;var z=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==z)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,
-n=mxUtils.createXmlDocument(),A=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=A.style?A.style.backgroundColor=a:A.setAttribute("style","background-color:"+a));null==n.createElementNS?(A.setAttribute("xmlns",mxConstants.NS_SVG),A.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/p;var q=Math.max(1,Math.ceil(z.width*a)+2*c)+(l?5:0),u=Math.max(1,Math.ceil(z.height*
-a)+2*c)+(l?5:0);A.setAttribute("version","1.1");A.setAttribute("width",q+"px");A.setAttribute("height",u+"px");A.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+q+" "+u);n.appendChild(A);var G=this.createSvgCanvas(A);G.foOffset=e?-.5:0;G.textOffset=e?-.5:0;G.imageOffset=e?-.5:0;G.translate(Math.floor((c/b-z.x)/p),Math.floor((c/b-z.y)/p));var r=document.createElement("textarea"),t=G.createAlternateContent;G.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,z,p){var A=this.state;if(null!=this.foAltText&&
-(0==d||0!=A.fontSize&&g.length<5*d/A.fontSize)){var n=this.createElement("text");n.setAttribute("x",Math.round(d/2));n.setAttribute("y",Math.round((e+A.fontSize)/2));n.setAttribute("fill",A.fontColor||"black");n.setAttribute("text-anchor","middle");n.setAttribute("font-size",Math.round(A.fontSize)+"px");n.setAttribute("font-family",A.fontFamily);(A.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&n.setAttribute("font-weight","bold");(A.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
-n.setAttribute("font-style","italic");(A.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.setAttribute("text-decoration","underline");try{return r.innerHTML=g,n.textContent=r.value,n}catch(ra){return t.apply(this,arguments)}}else return t.apply(this,arguments)};var w=this.backgroundImage;if(null!=w){b=p/b;var v=this.view.translate,x=new mxRectangle(v.x*b,v.y*b,w.width*b,w.height*b);mxUtils.intersects(z,x)&&G.image(v.x,v.y,w.width,w.height,w.src,!0)}G.scale(a);G.textEnabled=f;h=
-null!=h?h:this.createSvgImageExport();var S=h.drawCellState;h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&S.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),G);this.updateSvgLinks(A,k,!0);return A}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");
+new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,g,f,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;g=null!=g?g:!0;f=null!=f?f:!0;var A=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==A)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,
+n=mxUtils.createXmlDocument(),B=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=B.style?B.style.backgroundColor=a:B.setAttribute("style","background-color:"+a));null==n.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/p;var q=Math.max(1,Math.ceil(A.width*a)+2*c)+(l?5:0),u=Math.max(1,Math.ceil(A.height*
+a)+2*c)+(l?5:0);B.setAttribute("version","1.1");B.setAttribute("width",q+"px");B.setAttribute("height",u+"px");B.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+q+" "+u);n.appendChild(B);var H=this.createSvgCanvas(B);H.foOffset=e?-.5:0;H.textOffset=e?-.5:0;H.imageOffset=e?-.5:0;H.translate(Math.floor((c/b-A.x)/p),Math.floor((c/b-A.y)/p));var r=document.createElement("textarea"),t=H.createAlternateContent;H.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,A,p){var B=this.state;if(null!=this.foAltText&&
+(0==d||0!=B.fontSize&&g.length<5*d/B.fontSize)){var n=this.createElement("text");n.setAttribute("x",Math.round(d/2));n.setAttribute("y",Math.round((e+B.fontSize)/2));n.setAttribute("fill",B.fontColor||"black");n.setAttribute("text-anchor","middle");n.setAttribute("font-size",Math.round(B.fontSize)+"px");n.setAttribute("font-family",B.fontFamily);(B.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&n.setAttribute("font-weight","bold");(B.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
+n.setAttribute("font-style","italic");(B.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.setAttribute("text-decoration","underline");try{return r.innerHTML=g,n.textContent=r.value,n}catch(qa){return t.apply(this,arguments)}}else return t.apply(this,arguments)};var w=this.backgroundImage;if(null!=w){b=p/b;var v=this.view.translate,x=new mxRectangle(v.x*b,v.y*b,w.width*b,w.height*b);mxUtils.intersects(A,x)&&H.image(v.x,v.y,w.width,w.height,w.src,!0)}H.scale(a);H.textEnabled=f;h=
+null!=h?h:this.createSvgImageExport();var T=h.drawCellState;h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&T.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),H);this.updateSvgLinks(B,k,!0);return B}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");
for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&
(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",
a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,g=0;g<d.length;g++)var f=d[g].getAttribute("colspan"),e=e+(null!=f?parseInt(f):1);c=c.insertRow(b);for(g=0;g<e;g++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=
@@ -2612,7 +2612,7 @@ this.getAbsoluteUrl(a));d.setAttribute("title",c(this.isCustomLink(a)?this.getLi
function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor=
"default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,g,f){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),b=this.isCellSelected(g.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||
!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<
-d;++c)b.push(a.getRangeAt(c));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(S){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&
+d;++c)b.push(a.getRangeAt(c));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(T){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&
(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var h=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(a,b){h.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border=
"gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var g=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=
@@ -2628,7 +2628,7 @@ mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxCon
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,
"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};
mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
-this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(A){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,
+this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(B){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=
function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,g){mxEvent.isAltDown(g)&&(e=null);p.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/
d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
@@ -2656,12 +2656,12 @@ this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,
"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
this.secondDiv=null);q.apply(this,arguments)};var r=(new Date).getTime(),t=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){w.apply(this,arguments);c!=this.currentTerminalState?(r=(new Date).getTime(),t=0):t=(new Date).getTime()-r;this.currentTerminalState=c};var v=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
2E3<t||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&v.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
-d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;
-mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),
-null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var E=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,
-new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):E.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
-function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var D=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){D.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){B.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var M=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){M.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
+d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;
+mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),
+null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,
+new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):F.apply(this,arguments)};var D=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&D.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){E.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var M=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){M.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,
d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));
@@ -2669,12 +2669,12 @@ this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.cre
function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var L=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){L.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);
-this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var I=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){I.apply(this,
-arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var J=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
-function(){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
+this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var J=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){J.apply(this,
+arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
+"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
+function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Q=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Q.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
-a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var P=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var H=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){H.apply(this,arguments);null!=this.linkHint&&
+a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var P=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var I=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){I.apply(this,arguments);null!=this.linkHint&&
(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#d7d7d7";Format.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput curlyBracket singleArrow callout doubleArrow flexArrow card umlLifeline".split(" ");
Format.prototype.init=function(){var a=this.editorUi.editor,c=a.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});c.getSelectionModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.EDITING_STARTED,this.update);c.addListener(mxEvent.EDITING_STOPPED,this.update);c.getModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));a.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()}));
this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),d=0;d<a.length;d++)this.updateSelectionStateForCell(c,a[d],a);return c};
@@ -2766,49 +2766,49 @@ TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(m
" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var p=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([p]);g=e.cloneNode(!1);g.style.marginLeft="-3px";g.style.paddingBottom="0px";var n=function(a){return function(){return a()}},u=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),
b.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),g),q=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),g),r=this.editorUi.toolbar.addButton("geSprite-right",
mxResources.get("right"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),g);this.styleButtons([u,q,r]);if(b.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",null,function(){document.execCommand("strikeThrough",!1,null)},k);this.styleButtons([t]);t.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
-t.firstChild.style.backgroundPosition="2px 2px";t.firstChild.style.backgroundSize="18px 18px";this.styleButtons([t])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),g),v=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),g),y=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),g);this.styleButtons([w,v,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);var x,E,C,D,B,M,L;b.cellEditor.isContentEditing()?(w.style.display="none",v.style.display="none",y.style.display="none",p.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},g),this.styleButtons([C,
-x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},g),E=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},g)]),C.style.marginRight="9px",n=g.cloneNode(!1),n.style.paddingTop="4px",g=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),
+t.firstChild.style.backgroundPosition="2px 2px";t.firstChild.style.backgroundSize="18px 18px";this.styleButtons([t])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),g),v=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),g),z=this.editorUi.toolbar.addButton("geSprite-bottom",
+mxResources.get("bottom"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),g);this.styleButtons([w,v,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);var x,F,D,E,C,M,L;b.cellEditor.isContentEditing()?(w.style.display="none",v.style.display="none",z.style.display="none",p.style.display="none",D=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},g),this.styleButtons([D,
+x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},g),F=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},g)]),D.style.marginRight="9px",n=g.cloneNode(!1),n.style.paddingTop="4px",g=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),
function(){document.execCommand("insertorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-removeformat",
mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},n)],this.styleButtons(g),g[g.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),n.style.height="40"),a.appendChild(n)):(m[2].style.marginRight="9px",r.style.marginRight="9px");g=e.cloneNode(!1);g.style.marginLeft="0px";g.style.paddingTop="8px";g.style.paddingBottom="4px";g.style.fontWeight=
-"normal";mxUtils.write(g,mxResources.get("position"));var I=document.createElement("select");I.style.position="absolute";I.style.right="20px";I.style.width="97px";I.style.marginTop="-2px";for(var t="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),F={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,
+"normal";mxUtils.write(g,mxResources.get("position"));var J=document.createElement("select");J.style.position="absolute";J.style.right="20px";J.style.width="97px";J.style.marginTop="-2px";for(var t="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),G={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,
mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},n=0;n<t.length;n++){var J=document.createElement("option");J.setAttribute("value",t[n]);mxUtils.write(J,mxResources.get(t[n]));I.appendChild(J)}g.appendChild(I);t=e.cloneNode(!1);t.style.marginLeft="0px";t.style.paddingTop="4px";t.style.paddingBottom="4px";t.style.fontWeight="normal";mxUtils.write(t,mxResources.get("writingDirection"));
-var O=document.createElement("select");O.style.position="absolute";O.style.right="20px";O.style.width="97px";O.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},n=0;n<J.length;n++){var P=document.createElement("option");P.setAttribute("value",J[n]);mxUtils.write(P,mxResources.get(J[n]));O.appendChild(P)}t.appendChild(O);b.isEditing()||(a.appendChild(g),mxEvent.addListener(I,
-"change",function(a){b.getModel().beginUpdate();try{var c=F[I.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),a.appendChild(t),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,
-Q[O.value],b.getSelectionCells());mxEvent.consume(a)}));var H=document.createElement("input");H.style.textAlign="right";H.style.marginTop="4px";mxClient.IS_QUIRKS||(H.style.position="absolute",H.style.right="32px");H.style.width="46px";H.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(H);var A=null,g=this.installInputHandler(H,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},n=0;n<t.length;n++){var K=document.createElement("option");K.setAttribute("value",t[n]);mxUtils.write(K,mxResources.get(t[n]));J.appendChild(K)}g.appendChild(J);t=e.cloneNode(!1);t.style.marginLeft="0px";t.style.paddingTop="4px";t.style.paddingBottom="4px";t.style.fontWeight="normal";mxUtils.write(t,mxResources.get("writingDirection"));
+var O=document.createElement("select");O.style.position="absolute";O.style.right="20px";O.style.width="97px";O.style.marginTop="-2px";for(var K=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},n=0;n<K.length;n++){var P=document.createElement("option");P.setAttribute("value",K[n]);mxUtils.write(P,mxResources.get(K[n]));O.appendChild(P)}t.appendChild(O);b.isEditing()||(a.appendChild(g),mxEvent.addListener(J,
+"change",function(a){b.getModel().beginUpdate();try{var c=G[J.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),a.appendChild(t),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,
+Q[O.value],b.getSelectionCells());mxEvent.consume(a)}));var I=document.createElement("input");I.style.textAlign="right";I.style.marginTop="4px";mxClient.IS_QUIRKS||(I.style.position="absolute",I.style.right="32px");I.style.width="46px";I.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(I);var B=null,g=this.installInputHandler(I,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,
e){c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",
-!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var g=e.getElementsByTagName("*");c(e);for(e=0;e<g.length;e++)c(g[e])}H.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},g=null,document.selection?g=document.selection.createRange().parentElement():(d=window.getSelection(),0<d.rangeCount&&(g=d.getRangeAt(0).commonAncestorContainer)),null!=g&&c(b.cellEditor.textarea,
-g))for(A=a,document.execCommand("fontSize",!1,"4"),g=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<g.length;e++)if("4"==g[e].getAttribute("size")){g[e].removeAttribute("size");g[e].style.fontSize=A+"px";window.setTimeout(function(){H.value=A+" pt";A=null},0);break}},!0),g=this.createStepper(H,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=H.style.display;g.style.marginTop="4px";mxClient.IS_QUIRKS||(g.style.right="20px");k.appendChild(g);k=l.getElementsByTagName("div")[0];k.style.cssFloat=
-"right";var G=null,z="#ffffff",S=null,T="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return z},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){G=a},destroy:function(){G=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=
-null})});X.style.fontWeight="bold";var V=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");V.style.fontWeight="bold";k=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return T},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){S=a},destroy:function(){S=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,
-"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";V.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});k.style.fontWeight="bold";h.appendChild(k);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(V);
+!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var g=e.getElementsByTagName("*");c(e);for(e=0;e<g.length;e++)c(g[e])}I.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},g=null,document.selection?g=document.selection.createRange().parentElement():(d=window.getSelection(),0<d.rangeCount&&(g=d.getRangeAt(0).commonAncestorContainer)),null!=g&&c(b.cellEditor.textarea,
+g))for(B=a,document.execCommand("fontSize",!1,"4"),g=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<g.length;e++)if("4"==g[e].getAttribute("size")){g[e].removeAttribute("size");g[e].style.fontSize=B+"px";window.setTimeout(function(){I.value=B+" pt";B=null},0);break}},!0),g=this.createStepper(I,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=I.style.display;g.style.marginTop="4px";mxClient.IS_QUIRKS||(g.style.right="20px");k.appendChild(g);k=l.getElementsByTagName("div")[0];k.style.cssFloat=
+"right";var H=null,A="#ffffff",T=null,U="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return A},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){H=a},destroy:function(){H=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=
+null})});X.style.fontWeight="bold";var W=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");W.style.fontWeight="bold";k=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return U},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){T=a},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,
+"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";W.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});k.style.fontWeight="bold";h.appendChild(k);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(W);
a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);k.style.fontWeight="bold";f.containsLabel||f.autoSize||0!=f.edges.length||h.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));k.style.fontWeight="bold";h.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";
-k.style.paddingBottom="28px";k.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));k.appendChild(g);var aa,ia,ba,W,la,ca=this.addUnitInput(k,"pt",91,44,function(){aa.apply(this,arguments)}),fa=this.addUnitInput(k,"pt",20,44,function(){ia.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),
-20);mxUtils.br(k);mxUtils.br(k);var ga=this.addUnitInput(k,"pt",162,44,function(){ba.apply(this,arguments)}),Y=this.addUnitInput(k,"pt",91,44,function(){W.apply(this,arguments)}),Z=this.addUnitInput(k,"pt",20,44,function(){la.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ea=null,ja=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),
-null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ea&&(b.cellEditor.restoreSelection(ea),ea=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&
-b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ja=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],h,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",
+k.style.paddingBottom="28px";k.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));k.appendChild(g);var aa,ha,ba,R,ka,ca=this.addUnitInput(k,"pt",91,44,function(){aa.apply(this,arguments)}),ea=this.addUnitInput(k,"pt",20,44,function(){ha.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),
+20);mxUtils.br(k);mxUtils.br(k);var fa=this.addUnitInput(k,"pt",162,44,function(){ba.apply(this,arguments)}),Y=this.addUnitInput(k,"pt",91,44,function(){R.apply(this,arguments)}),Z=this.addUnitInput(k,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var da=null,ia=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),
+null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=da&&(b.cellEditor.restoreSelection(da),da=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&
+b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ia=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(da=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(da=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],h,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",
mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(k);this.styleButtons(g);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(h);a.appendChild(k);mxClient.IS_QUIRKS&&
-(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=M?M.cellIndex:0))}catch(R){this.editorUi.handleError(R)}}),k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=M?M.cellIndex+1:
--1))}catch(R){this.editorUi.handleError(R)}}),k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=B&&null!=M&&b.deleteColumn(B,M.cellIndex)}catch(R){this.editorUi.handleError(R)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=B&&null!=L&&b.selectNode(b.insertRow(B,L.sectionRowIndex))}catch(R){this.editorUi.handleError(R)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",
-mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=B&&null!=L&&b.selectNode(b.insertRow(B,L.sectionRowIndex+1))}catch(R){this.editorUi.handleError(R)}}),k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=B&&null!=L&&b.deleteRow(B,L.sectionRowIndex)}catch(R){this.editorUi.handleError(R)}}),k)];this.styleButtons(g);g[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom=
-"10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=B){var a=B.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
-("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(B.removeAttribute("border"),B.style.border="",B.style.borderCollapse=""):(B.setAttribute("border","1"),B.style.border="1px solid "+a,B.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=B){var a=B.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
-function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){B.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=B){var a=B.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?B.setAttribute("cellPadding",
-a):B.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=B&&B.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=B&&B.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=B&&B.setAttribute("align","right")},
-e)];this.styleButtons(g);g[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var U=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==
-mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(p,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=H)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),H.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-c(u,a==mxConstants.ALIGN_LEFT);c(q,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(v,a==mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);I.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?
+(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=C&&b.selectNode(b.insertColumn(C,null!=M?M.cellIndex:0))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=C&&b.selectNode(b.insertColumn(C,null!=M?M.cellIndex+1:
+-1))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=C&&null!=M&&b.deleteColumn(C,M.cellIndex)}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=C&&null!=L&&b.selectNode(b.insertRow(C,L.sectionRowIndex))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",
+mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=C&&null!=L&&b.selectNode(b.insertRow(C,L.sectionRowIndex+1))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=C&&null!=L&&b.deleteRow(C,L.sectionRowIndex)}catch(S){this.editorUi.handleError(S)}}),k)];this.styleButtons(g);g[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom=
+"10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=C){var a=C.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(C.removeAttribute("border"),C.style.border="",C.style.borderCollapse=""):(C.setAttribute("border","1"),C.style.border="1px solid "+a,C.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=C){var a=C.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){C.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=C){var a=C.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?C.setAttribute("cellPadding",
+a):C.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=C&&C.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=C&&C.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=C&&C.setAttribute("align","right")},
+e)];this.styleButtons(g);g[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);E=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var V=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==
+mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(p,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=I)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),I.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
+c(u,a==mxConstants.ALIGN_LEFT);c(q,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(v,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);J.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?
"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
-a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(f.style,
-mxConstants.STYLE_SPACING_RIGHT,0)),Z.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Y.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),ga.value=isNaN(a)?"":a+" pt"});ia=this.installInputHandler(fa,mxConstants.STYLE_SPACING,2,-999,999," pt");aa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");la=this.installInputHandler(Z,
-mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");W=this.installInputHandler(Y,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(ga,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(H,U);this.addKeyHandler(fa,U);this.addKeyHandler(ca,U);this.addKeyHandler(Z,U);this.addKeyHandler(Y,U);this.addKeyHandler(ga,U);b.getModel().addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){b.getModel().removeListener(U)}});U();if(b.cellEditor.isContentEditing()){var oa=
-!1,e=function(){oa||(oa=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=
+a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(f.style,
+mxConstants.STYLE_SPACING_RIGHT,0)),Z.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Y.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),fa.value=isNaN(a)?"":a+" pt"});ha=this.installInputHandler(ea,mxConstants.STYLE_SPACING,2,-999,999," pt");aa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ka=this.installInputHandler(Z,
+mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");R=this.installInputHandler(Y,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(fa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(I,V);this.addKeyHandler(ea,V);this.addKeyHandler(ca,V);this.addKeyHandler(Z,V);this.addKeyHandler(Y,V);this.addKeyHandler(fa,V);b.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){b.getModel().removeListener(V)}});V();if(b.cellEditor.isContentEditing()){var na=
+!1,e=function(){na||(na=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=
null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},f=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);
var h=mxUtils.getCurrentStyle(a),k=g(h),p=f(k,h,a),n=a.getElementsByTagName("*");if(0<n.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var t=window.getSelection(),w=0;w<n.length;w++)if(t.containsNode(n[w],!0)){temp=mxUtils.getCurrentStyle(n[w]);var k=Math.max(g(temp),k),v=f(k,temp,n[w]);if(v!=p||isNaN(v))p=""}null!=h&&(c(m[0],"bold"==h.fontWeight||400<h.fontWeight||e("B")||e("STRONG")),c(m[1],"italic"==h.fontStyle||e("I")||e("EM")),c(m[2],e("U")),c(u,d(h.textAlign,"left")),c(q,
-d(h.textAlign,"center")),c(r,d(h.textAlign,"right")),c(C,d(h.textAlign,"justify")),c(E,e("SUP")),c(x,e("SUB")),B=b.getParentByName(a,"TABLE",b.cellEditor.textarea),L=null==B?null:b.getParentByName(a,"TR",B),M=null==B?null:b.getParentByName(a,"TD",B),D.style.display=null!=B?"":"none",document.activeElement!=H&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=A?(a.removeAttribute("size"),a.style.fontSize=A+" pt",A=null):H.value=isNaN(k)?"":k+" pt",v=parseFloat(p),isNaN(v)?ja.value="100 %":ja.value=
-Math.round(100*v)+" %"),d=h.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),e=h.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=S&&(T="#"==d.charAt(0)?
-d:"#000000",S(T,!0)),null!=G&&(z="#"==e.charAt(0)?e:null,G(z,!0)),null!=l.firstChild&&(h=h.fontFamily,"'"==h.charAt(0)&&(h=h.substring(1)),"'"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1)),'"'==h.charAt(0)&&(h=h.substring(1)),'"'==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1)),l.firstChild.nodeValue=h))}oa=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,
+d(h.textAlign,"center")),c(r,d(h.textAlign,"right")),c(D,d(h.textAlign,"justify")),c(F,e("SUP")),c(x,e("SUB")),C=b.getParentByName(a,"TABLE",b.cellEditor.textarea),L=null==C?null:b.getParentByName(a,"TR",C),M=null==C?null:b.getParentByName(a,"TD",C),E.style.display=null!=C?"":"none",document.activeElement!=I&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=B?(a.removeAttribute("size"),a.style.fontSize=B+" pt",B=null):I.value=isNaN(k)?"":k+" pt",v=parseFloat(p),isNaN(v)?ia.value="100 %":ia.value=
+Math.round(100*v)+" %"),d=h.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),e=h.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=T&&(U="#"==d.charAt(0)?
+d:"#000000",T(U,!0)),null!=H&&(A="#"==e.charAt(0)?e:null,H(A,!0)),null!=l.firstChild&&(h=h.fontFamily,"'"==h.charAt(0)&&(h=h.substring(1)),"'"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1)),'"'==h.charAt(0)&&(h=h.substring(1)),'"'==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1)),l.firstChild.nodeValue=h))}na=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,
"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41);a.style.paddingTop="8px";a.style.paddingBottom="8px";this.container.appendChild(a);this.container.appendChild(this.addEffects(this.createPanel()));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
@@ -2835,13 +2835,13 @@ r=this.editorUi.toolbar.addMenuFunctionInContainer(q,"geSprite-connection",mxRes
["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,
null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(q,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){u(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));u(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
u(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");u(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");u(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=n.cloneNode(!1),t=document.createElement("input");t.style.textAlign="right";
-t.style.marginTop="2px";t.style.width="41px";t.setAttribute("title",mxResources.get("linewidth"));n.appendChild(t);var w=t.cloneNode(!0);q.appendChild(w);var v=this.createStepper(t,c,1,9);v.style.display=t.style.display;v.style.marginTop="2px";n.appendChild(v);var y=this.createStepper(w,d,1,9);y.style.display=w.style.display;y.style.marginTop="2px";q.appendChild(y);mxClient.IS_QUIRKS?(t.style.height="17px",w.style.height="17px"):(t.style.position="absolute",t.style.right="32px",t.style.height="15px",
-v.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",y.style.right="20px");mxEvent.addListener(t,"blur",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",
+t.style.marginTop="2px";t.style.width="41px";t.setAttribute("title",mxResources.get("linewidth"));n.appendChild(t);var w=t.cloneNode(!0);q.appendChild(w);var v=this.createStepper(t,c,1,9);v.style.display=t.style.display;v.style.marginTop="2px";n.appendChild(v);var z=this.createStepper(w,d,1,9);z.style.display=w.style.display;z.style.marginTop="2px";q.appendChild(z);mxClient.IS_QUIRKS?(t.style.height="17px",w.style.height="17px"):(t.style.position="absolute",t.style.right="32px",t.style.height="15px",
+v.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",z.style.right="20px");mxEvent.addListener(t,"blur",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",
[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,
mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",
mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,
-!0).setAttribute("title",mxResources.get("entityRelation")))})),E=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML=
+!0).setAttribute("title",mxResources.get("entityRelation")))})),F=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML=
'<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-startblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],"geIcon geSprite geSprite-startasync",
@@ -2852,7 +2852,7 @@ null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-startthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],"geIcon geSprite geSprite-startdash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],"geIcon geSprite geSprite-startcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
"startFill"],["circlePlus",0],"geIcon geSprite geSprite-startcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],"geIcon geSprite geSprite-startcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],"geIcon geSprite geSprite-starterone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],"geIcon geSprite geSprite-starteronetoone",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],"geIcon geSprite geSprite-startermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],"geIcon geSprite geSprite-starteronetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-starteroneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",
-[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),C=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||
+[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),D=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||
"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-endclassic",
null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-endclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-endopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],
[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-endopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],"geIcon geSprite geSprite-endopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-endblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],
@@ -2863,21 +2863,21 @@ mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstant
0],"geIcon geSprite geSprite-enddiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(r,8);this.addArrow(x);this.addArrow(E);this.addArrow(C);v=this.addArrow(l,
-9);v.className="geIcon";v.style.width="84px";y=this.addArrow(m,9);y.className="geIcon";y.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom="1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";v.appendChild(D);var B=document.createElement("div");B.style.width="23px";B.style.height="1px";B.style.borderBottom="1px solid "+this.defaultStrokeColor;B.style.marginBottom="9px";y.appendChild(B);l.style.height="15px";m.style.height=
-"15px";r.style.height="15px";x.style.height="17px";E.style.marginLeft="3px";E.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";a.appendChild(h);a.appendChild(q);a.appendChild(n);l=n.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
-l.appendChild(m);var M,L,I=this.addUnitInput(l,"pt",74,33,function(){M.apply(this,arguments)}),F=this.addUnitInput(l,"pt",20,33,function(){L.apply(this,arguments)});mxUtils.br(l);v=document.createElement("div");v.style.height="8px";l.appendChild(v);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,O,Q=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),P=this.addUnitInput(l,"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,
+"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(r,8);this.addArrow(x);this.addArrow(F);this.addArrow(D);v=this.addArrow(l,
+9);v.className="geIcon";v.style.width="84px";z=this.addArrow(m,9);z.className="geIcon";z.style.width="22px";var E=document.createElement("div");E.style.width="85px";E.style.height="1px";E.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.marginBottom="9px";v.appendChild(E);var C=document.createElement("div");C.style.width="23px";C.style.height="1px";C.style.borderBottom="1px solid "+this.defaultStrokeColor;C.style.marginBottom="9px";z.appendChild(C);l.style.height="15px";m.style.height=
+"15px";r.style.height="15px";x.style.height="17px";F.style.marginLeft="3px";F.style.height="17px";D.style.marginLeft="3px";D.style.height="17px";a.appendChild(h);a.appendChild(q);a.appendChild(n);l=n.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
+l.appendChild(m);var M,L,J=this.addUnitInput(l,"pt",74,33,function(){M.apply(this,arguments)}),G=this.addUnitInput(l,"pt",20,33,function(){L.apply(this,arguments)});mxUtils.br(l);v=document.createElement("div");v.style.height="8px";l.appendChild(v);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var K,O,Q=this.addUnitInput(l,"pt",74,33,function(){K.apply(this,arguments)}),P=this.addUnitInput(l,"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,
mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,
-mxResources.get("perimeter"));h.appendChild(m);var H,A=this.addUnitInput(h,"pt",20,41,function(){H.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var G=mxUtils.bind(this,function(a,c,d){function h(a,c,d,g){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(g,e.style.shape,a,c);"geSprite geSprite-noarrow"==
+mxResources.get("perimeter"));h.appendChild(m);var I,B=this.addUnitInput(h,"pt",20,41,function(){I.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,g){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(g,e.style.shape,a,c);"geSprite geSprite-noarrow"==
d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,p,null);if(d||document.activeElement!=t)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),t.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
-w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?D.style.borderBottom="1px dashed "+
-this.defaultStrokeColor:D.style.borderBottom="1px dotted "+this.defaultStrokeColor:D.style.borderBottom="1px solid "+this.defaultStrokeColor;B.style.borderBottom=D.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||
+w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?E.style.borderBottom="1px dashed "+
+this.defaultStrokeColor:E.style.borderBottom="1px dotted "+this.defaultStrokeColor:E.style.borderBottom="1px solid "+this.defaultStrokeColor;C.style.borderBottom=E.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||
"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";r.getElementsByTagName("div")[0].className="link"==
-e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(q.style.display="",n.style.display="none"):(q.style.display="none",n.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),E,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
-"endFill","1"),C,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(E,30),mxUtils.setOpacity(C,30)):(mxUtils.setOpacity(E,100),mxUtils.setOpacity(C,100));if(d||document.activeElement!=
-P)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=F)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),F.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0)),I.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=A)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),A.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(P,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");L=this.installInputHandler(F,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");M=this.installInputHandler(I,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0,-999,999," pt");H=this.installInputHandler(A,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(t,G);this.addKeyHandler(P,G);this.addKeyHandler(Q,G);this.addKeyHandler(F,G);this.addKeyHandler(I,G);this.addKeyHandler(A,G);f.getModel().addListener(mxEvent.CHANGE,G);this.listeners.push({destroy:function(){f.getModel().removeListener(G)}});G();return a};
+e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(q.style.display="",n.style.display="none"):(q.style.display="none",n.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),F,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
+"endFill","1"),D,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(F,30),mxUtils.setOpacity(D,30)):(mxUtils.setOpacity(F,100),mxUtils.setOpacity(D,100));if(d||document.activeElement!=
+P)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+0)),J.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=B)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),B.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(P,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");L=this.installInputHandler(G,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");M=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+0,-999,999," pt");I=this.installInputHandler(B,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(t,H);this.addKeyHandler(P,H);this.addKeyHandler(Q,H);this.addKeyHandler(G,H);this.addKeyHandler(J,H);this.addKeyHandler(B,H);f.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){f.getModel().removeListener(H)}});H();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.fontWeight="bold";f.style.width="80px";mxUtils.write(f,mxResources.get("lineJumps"));a.appendChild(f);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px";
e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],h=0;h<f.length;h++){var g=document.createElement("option");g.setAttribute("value",f[h]);mxUtils.write(g,mxResources.get(f[h]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
mxEvent.addListener(e,"click",function(a){mxEvent.consume(a)});a.appendChild(e);var k,l=this.addUnitInput(a,"pt",22,33,function(){k.apply(this,arguments)});k=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();e.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
@@ -2903,14 +2903,14 @@ function(){b.set(d.pageFormat)});var f=function(){b.set(d.pageFormat)};c.addList
DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function u(){mxActor.call(this)}function q(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function r(){mxRectangleShape.call(this)}function t(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}
-function M(){mxEllipse.call(this)}function L(){mxShape.call(this)}function I(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxShape.call(this)}function H(){mxShape.call(this)}function A(){mxCylinder.call(this)}function G(){mxDoubleEllipse.call(this)}function z(){mxDoubleEllipse.call(this)}function S(){mxArrowConnector.call(this);this.spacing=0}function T(){mxArrowConnector.call(this);
-this.spacing=0}function X(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function ia(){mxActor.call(this)}function ba(){mxActor.call(this)}function W(){mxActor.call(this)}function la(){mxActor.call(this)}function ca(){mxActor.call(this)}function fa(){mxActor.call(this)}function ga(){mxActor.call(this)}function Y(){mxActor.call(this)}function Z(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ja(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}
-function oa(){mxRhombus.call(this)}function R(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function va(){mxActor.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function ma(){mxConnector.call(this)}function Fa(a,b,c,d,e,g,f,h,k,l){f+=k;var K=d.clone();d.x-=e*(2*f+k);d.y-=g*(2*f+k);e*=f+k;g*=f+k;return function(){a.ellipse(K.x-e-f,K.y-g-f,2*f,2*f);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
-mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),K=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,
-g);a.lineTo(d,e);a.lineTo(g,e);a.lineTo(0,e-g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-g,0),a.lineTo(d,g),a.lineTo(g,g),a.close(),a.fill()),0!=K&&(a.setFillAlpha(Math.abs(K)),a.setFillColor(0>K?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(g,g),a.lineTo(g,e),a.lineTo(0,e-g),a.close(),a.fill()),a.begin(),a.moveTo(g,e),a.lineTo(g,g),a.lineTo(0,
-0),a.moveTo(g,g),a.lineTo(d,g),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Aa=Math.tan(mxUtils.toRadians(30)),na=(.5-Aa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Aa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*
-b,b*na);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-na)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.min(d,e/(.5+Aa));g?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-na)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-na)*b),a.lineTo(.5*b,(1-na)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*na),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-na)*b),a.lineTo(0,
+this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function r(){mxRectangleShape.call(this)}function t(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function v(){mxActor.call(this)}function z(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function D(){mxCylinder.call(this)}function E(){mxShape.call(this)}function C(){mxShape.call(this)}
+function M(){mxEllipse.call(this)}function L(){mxShape.call(this)}function J(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxShape.call(this)}function I(){mxShape.call(this)}function B(){mxCylinder.call(this)}function H(){mxDoubleEllipse.call(this)}function A(){mxDoubleEllipse.call(this)}function T(){mxArrowConnector.call(this);this.spacing=0}function U(){mxArrowConnector.call(this);
+this.spacing=0}function X(){mxActor.call(this)}function W(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function ha(){mxActor.call(this)}function ba(){mxActor.call(this)}function R(){mxActor.call(this)}function ka(){mxActor.call(this)}function ca(){mxActor.call(this)}function ea(){mxActor.call(this)}function fa(){mxActor.call(this)}function Y(){mxActor.call(this)}function Z(){mxActor.call(this)}function da(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function V(){mxEllipse.call(this)}
+function na(){mxRhombus.call(this)}function S(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function la(){mxConnector.call(this)}function Fa(a,b,c,d,e,g,f,h,k,l){f+=k;var y=d.clone();d.x-=e*(2*f+k);d.y-=g*(2*f+k);e*=f+k;g*=f+k;return function(){a.ellipse(y.x-e-f,y.y-g-f,2*f,2*f);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),y=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,
+g);a.lineTo(d,e);a.lineTo(g,e);a.lineTo(0,e-g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-g,0),a.lineTo(d,g),a.lineTo(g,g),a.close(),a.fill()),0!=y&&(a.setFillAlpha(Math.abs(y)),a.setFillColor(0>y?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(g,g),a.lineTo(g,e),a.lineTo(0,e-g),a.close(),a.fill()),a.begin(),a.moveTo(g,e),a.lineTo(g,g),a.lineTo(0,
+0),a.moveTo(g,g),a.lineTo(d,g),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Aa=Math.tan(mxUtils.toRadians(30)),ma=(.5-Aa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Aa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*
+b,b*ma);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ma)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.min(d,e/(.5+Aa));g?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-ma)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ma)*b),a.lineTo(.5*b,(1-ma)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ma),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ma)*b),a.lineTo(0,
.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,-b);g||(a.moveTo(0,
b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",b);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),
f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,g);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-g,0),a.lineTo(d-g,g),a.lineTo(d,g),a.close(),a.fill()),a.begin(),a.moveTo(d-g,0),a.lineTo(d-g,g),a.lineTo(d,g),a.end(),a.stroke())};
@@ -2925,8 +2925,8 @@ function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.get
e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",p);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,
e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",n);mxUtils.extend(u,mxActor);u.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",u);q.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
b;this.firstX=a;this.firstY=b};q.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};q.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};q.prototype.curveTo=function(a,b,c,d,e,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};q.prototype.arcTo=function(a,b,c,d,
-e,g,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),g=Math.sqrt(d*d+e*e);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(g/10),h=this.defaultVariation;5>f&&(f=5,h/=3);for(var K=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,
-d=d/g,e=e/g,g=0;g<f;g++){var k=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,K*g+this.lastX-k*e,c*g+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
+e,g,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),g=Math.sqrt(d*d+e*e);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(g/10),y=this.defaultVariation;5>f&&(f=5,y/=3);for(var h=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,
+d=d/g,e=e/g,g=0;g<f;g++){var k=(Math.random()-.5)*y;this.originalLineTo.call(this.canvas,h*g+this.lastX-k*e,c*g+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
var Ka=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ka.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var La=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&La.apply(this,arguments)};var Ma=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ma.apply(this,arguments);else{var g=!0;null!=this.style&&(g="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(g||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)g||null!=this.fill&&this.fill!=mxConstants.NONE||
(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?g=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.min(d*g,e*g)),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadTo(b+d,c,b+d,c+g),a.lineTo(b+d,c+e-g),a.quadTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadTo(b,c+e,b,c+e-g),
@@ -2936,21 +2936,21 @@ function(a,b,c,d,e){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(th
mxRectangleShape);t.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};t.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",t);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable=
function(){return!0};w.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,g+h),e-c),new mxPoint(f,e),new mxPoint(Math.max(0,g),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(v,mxActor);v.prototype.size=.2;v.prototype.fixedSize=20;v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",v);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
-function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,
+"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",v);mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.prototype.isRoundable=function(){return!0};z.prototype.redrawPath=
+function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",z);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,
b,c,d,e){var g=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+g);a.lineTo(b+d/2,c+e-g);a.moveTo(b+g,c+e/2);a.lineTo(b+d-g,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Ga=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ga.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&(a.setShadow(!1),Ga.apply(this,[a,b,c,d,e]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};E.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,f;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+
-g]];if(null!=f){var h=this.style["symbol"+g+"Align"],k=this.style["symbol"+g+"VerticalAlign"],K=this.style["symbol"+g+"Width"],l=this.style["symbol"+g+"Height"],m=this.style["symbol"+g+"Spacing"]||0,Da=this.style["symbol"+g+"VSpacing"]||m,da=this.style["symbol"+g+"ArcSpacing"];null!=da&&(da*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),m+=da,Da+=da);var da=b,sa=c,da=h==mxConstants.ALIGN_CENTER?da+(d-K)/2:h==mxConstants.ALIGN_RIGHT?da+(d-K-m):da+m,sa=k==mxConstants.ALIGN_MIDDLE?sa+(e-l)/
-2:k==mxConstants.ALIGN_BOTTOM?sa+(e-l-Da):sa+Da;a.save();h=new f;h.style=this.style;f.prototype.paintVertexShape.call(h,a,da,sa,K,l);a.restore()}g++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,b,c,d,e,g){g?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
-C);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(M,mxEllipse);M.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
-M);mxUtils.extend(L,mxShape);L.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};I.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
-e/8,d,7*e/8);a.fillAndStroke()};I.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",I);mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};F.prototype.paintBackground=
-function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"participant");null==f||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,g):(f=this.state.view.graph.cellRenderer.getShape(f),null!=f&&f!=F&&(f=new f,f.apply(this.state),a.save(),f.paintVertexShape(a,b,c,d,g),a.restore()));g<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+g),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};F.prototype.paintForeground=
-function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",F);mxUtils.extend(J,mxShape);J.prototype.width=60;J.prototype.height=30;J.prototype.corner=10;J.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};J.prototype.paintBackground=function(a,b,c,d,e){var g=this.corner,f=Math.min(d,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
-mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+f,c);a.lineTo(b+f,c+Math.max(0,h-1.5*g));a.lineTo(b+Math.max(0,f-g),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",J);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=F.prototype.size;
+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ga.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&(a.setShadow(!1),Ga.apply(this,[a,b,c,d,e]))}};mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
+this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};F.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,f;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+
+g]];if(null!=f){var h=this.style["symbol"+g+"Align"],y=this.style["symbol"+g+"VerticalAlign"],k=this.style["symbol"+g+"Width"],l=this.style["symbol"+g+"Height"],va=this.style["symbol"+g+"Spacing"]||0,Da=this.style["symbol"+g+"VSpacing"]||va,m=this.style["symbol"+g+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),va+=m,Da+=m);var m=b,ra=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-va):m+va,ra=y==mxConstants.ALIGN_MIDDLE?ra+(e-l)/2:y==
+mxConstants.ALIGN_BOTTOM?ra+(e-l-Da):ra+Da;a.save();h=new f;h.style=this.style;f.prototype.paintVertexShape.call(h,a,m,ra,k,l);a.restore()}g++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",F);mxUtils.extend(D,mxCylinder);D.prototype.redrawPath=function(a,b,c,d,e,g){g?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
+D);mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",E);mxUtils.extend(C,mxShape);C.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};C.prototype.paintBackground=
+function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",C);mxUtils.extend(M,mxEllipse);M.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
+M);mxUtils.extend(L,mxShape);L.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(J,mxShape);J.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};J.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
+e/8,d,7*e/8);a.fillAndStroke()};J.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};G.prototype.paintBackground=
+function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"participant");null==f||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,g):(f=this.state.view.graph.cellRenderer.getShape(f),null!=f&&f!=G&&(f=new f,f.apply(this.state),a.save(),f.paintVertexShape(a,b,c,d,g),a.restore()));g<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+g),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};G.prototype.paintForeground=
+function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",G);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,b,c,d,e){var g=this.corner,f=Math.min(d,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+f,c);a.lineTo(b+f,c+Math.max(0,h-1.5*g));a.lineTo(b+Math.max(0,f-g),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=G.prototype.size;
null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),
a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",w.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;
@@ -2958,99 +2958,118 @@ null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.he
f+k),new mxPoint(g+e,f)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<g||c.x>g+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(f,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=p.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h-e,f),new mxPoint(g+h,f+k),new mxPoint(g,f+k),new mxPoint(g+e,f)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g,f),new mxPoint(g+h,f),new mxPoint(g+h-e,f+k),new mxPoint(g+e,f+k),new mxPoint(g,f)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),f=[new mxPoint(g,f+e),new mxPoint(g+h,f),new mxPoint(g+h,f+k),new mxPoint(g,f+k-e),new mxPoint(g,f+e)]):(e=k*Math.max(0,
Math.min(1,e)),f=[new mxPoint(g,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+k-e),new mxPoint(g,f+k),new mxPoint(g,f)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<g||c.x>g+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(f,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),g=e?v.prototype.fixedSize:v.prototype.size;null!=b&&(g=mxUtils.getValue(b.style,
-"size",g));var f=a.x,h=a.y,k=a.width,l=a.height,K=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(f+k-e,h),new mxPoint(f+k,a),new mxPoint(f+k-e,h+l),new mxPoint(f,h+l),new mxPoint(f+e,a),new mxPoint(f,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,
-Math.min(1,g)),h=[new mxPoint(f+e,h),new mxPoint(f+k,h),new mxPoint(f+k-e,a),new mxPoint(f+k,h+l),new mxPoint(f+e,h+l),new mxPoint(f,a),new mxPoint(f+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h+e),new mxPoint(K,h),new mxPoint(f+k,h+e),new mxPoint(f+k,h+l),new mxPoint(K,h+l-e),new mxPoint(f,h+l),new mxPoint(f,h+e)]):(e=e?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(K,h+e),new mxPoint(f+
-k,h),new mxPoint(f+k,h+l-e),new mxPoint(K,h+l),new mxPoint(f,h+l-e),new mxPoint(f,h)]);K=new mxPoint(K,a);d&&(c.x<f||c.x>f+k?K.y=c.y:K.x=c.x);return mxUtils.getPerimeterPoint(h,K,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),f=[new mxPoint(l,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+k-e),new mxPoint(l,f+k),new mxPoint(g,f+k-e),new mxPoint(g,f+e),new mxPoint(l,f)]):(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h-e,f),new mxPoint(g+h,a),new mxPoint(g+h-e,f+k),new mxPoint(g+e,f+k),new mxPoint(g,a),new mxPoint(g+e,f)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+
-h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(f,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(Q,mxShape);Q.prototype.size=
+"size",g));var f=a.x,h=a.y,k=a.width,y=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(f+k-e,h),new mxPoint(f+k,a),new mxPoint(f+k-e,h+y),new mxPoint(f,h+y),new mxPoint(f+e,a),new mxPoint(f,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,
+Math.min(1,g)),h=[new mxPoint(f+e,h),new mxPoint(f+k,h),new mxPoint(f+k-e,a),new mxPoint(f+k,h+y),new mxPoint(f+e,h+y),new mxPoint(f,a),new mxPoint(f+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(y,g)):y*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h+e),new mxPoint(l,h),new mxPoint(f+k,h+e),new mxPoint(f+k,h+y),new mxPoint(l,h+y-e),new mxPoint(f,h+y),new mxPoint(f,h+e)]):(e=e?Math.max(0,Math.min(y,g)):y*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(l,h+e),new mxPoint(f+
+k,h),new mxPoint(f+k,h+y-e),new mxPoint(l,h+y),new mxPoint(f,h+y-e),new mxPoint(f,h)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=z.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.height,y=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),f=[new mxPoint(y,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+k-e),new mxPoint(y,f+k),new mxPoint(g,f+k-e),new mxPoint(g,f+e),new mxPoint(y,f)]):(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h-e,f),new mxPoint(g+h,a),new mxPoint(g+h-e,f+k),new mxPoint(g+e,f+k),new mxPoint(g,a),new mxPoint(g+e,f)]);y=new mxPoint(y,a);d&&(c.x<g||c.x>g+
+h?y.y=c.y:y.x=c.x);return mxUtils.getPerimeterPoint(f,y,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(Q,mxShape);Q.prototype.size=
10;Q.prototype.inset=2;Q.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,g+f);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-g)/2-f,g/2);a.quadTo((d-g)/2-f,g+f,d/2,g+f);a.quadTo((d+g)/2+f,g+f,(d+g)/2+f,g/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(P,mxShape);P.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",P);mxUtils.extend(H,mxShape);H.prototype.inset=2;H.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,g,d-2*g,e-2*g);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
-H);mxUtils.extend(A,mxCylinder);A.prototype.jettyWidth=32;A.prototype.jettyHeight=12;A.prototype.redrawPath=function(a,b,c,d,e,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,h=.3*e-b/2,k=.7*e-b/2;g?(a.moveTo(c,h),a.lineTo(f,h),a.lineTo(f,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(f,k),a.lineTo(f,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
-a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",A);mxUtils.extend(G,mxDoubleEllipse);G.prototype.outerStroke=!0;G.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+g,c+g,d-2*g,e-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",G);
-mxUtils.extend(z,G);z.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",z);mxUtils.extend(S,mxArrowConnector);S.prototype.defaultWidth=4;S.prototype.isOpenEnded=function(){return!0};S.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};S.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",S);mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=10;T.prototype.defaultArrowWidth=
-20;T.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};T.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",T);mxUtils.extend(X,mxActor);X.prototype.size=30;X.prototype.isRoundable=
-function(){return!0};X.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",X);mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;V.prototype.isHtmlAllowed=function(){return!1};
-V.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));f=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+g);a.lineTo(b+d,c+g);a.end();a.stroke();
-a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",V);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("corner",aa);mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ia);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy=
+function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",P);mxUtils.extend(I,mxShape);I.prototype.inset=2;I.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,g,d-2*g,e-2*g);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
+I);mxUtils.extend(B,mxCylinder);B.prototype.jettyWidth=32;B.prototype.jettyHeight=12;B.prototype.redrawPath=function(a,b,c,d,e,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,h=.3*e-b/2,k=.7*e-b/2;g?(a.moveTo(c,h),a.lineTo(f,h),a.lineTo(f,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(f,k),a.lineTo(f,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
+a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",B);mxUtils.extend(H,mxDoubleEllipse);H.prototype.outerStroke=!0;H.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+g,c+g,d-2*g,e-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",H);
+mxUtils.extend(A,H);A.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",A);mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=4;T.prototype.isOpenEnded=function(){return!0};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};T.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",T);mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=10;U.prototype.defaultArrowWidth=
+20;U.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};U.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",U);mxUtils.extend(X,mxActor);X.prototype.size=30;X.prototype.isRoundable=
+function(){return!0};X.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",X);mxUtils.extend(W,mxRectangleShape);W.prototype.dx=20;W.prototype.dy=20;W.prototype.isHtmlAllowed=function(){return!1};
+W.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));f=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+g);a.lineTo(b+d,c+g);a.end();a.stroke();
+a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",W);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("corner",aa);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ha);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy=
20;ba.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-
-b)/2,c),new mxPoint(0,c)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("tee",ba);mxUtils.extend(W,mxActor);W.prototype.arrowWidth=.3;W.prototype.arrowSize=.2;W.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",W);mxUtils.extend(la,mxActor);la.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",W.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",W.prototype.arrowSize))));
-c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(b,g),new mxPoint(b,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",la);mxUtils.extend(ca,mxActor);ca.prototype.size=.1;ca.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ca);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",fa);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);
-a.close();a.end()};mxCellRenderer.registerShape("xor",ga);mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,
+b)/2,c),new mxPoint(0,c)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("tee",ba);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",R);mxUtils.extend(ka,mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));
+c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(b,g),new mxPoint(b,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ka);mxUtils.extend(ca,mxActor);ca.prototype.size=.1;ca.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ca);mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",ea);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);
+a.close();a.end()};mxCellRenderer.registerShape("xor",fa);mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,
c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",Y);mxUtils.extend(Z,mxActor);Z.prototype.size=.375;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};
-mxCellRenderer.registerShape("offPageConnector",Z);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);
-a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ja);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",U);mxUtils.extend(oa,
-mxRhombus);oa.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",oa);mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};
-mxCellRenderer.registerShape("collate",R);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){var g=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,g);a.lineTo(b+10,g-5);a.moveTo(b,g);a.lineTo(b+10,g+5);a.moveTo(b,g);a.lineTo(b+d,g);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,g);a.lineTo(b+d-10,g-5);a.moveTo(b+d,g);a.lineTo(b+d-10,g+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=
+mxCellRenderer.registerShape("offPageConnector",Z);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",da);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);
+a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ia);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",V);mxUtils.extend(na,
+mxRhombus);na.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",na);mxUtils.extend(S,mxEllipse);S.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};
+mxCellRenderer.registerShape("collate",S);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){var g=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,g);a.lineTo(b+10,g-5);a.moveTo(b,g);a.lineTo(b+10,g+5);a.moveTo(b,g);a.lineTo(b+d,g);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,g);a.lineTo(b+d-10,g-5);a.moveTo(b+d,g);a.lineTo(b+d-10,g+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=
function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&
-a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ca);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ua);mxUtils.extend(va,mxActor);va.prototype.redrawPath=
-function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",va);mxUtils.extend(pa,mxActor);pa.prototype.size=.2;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var g=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-g)/2;c=b+g;var f=(d-g)/2,g=f+g;a.moveTo(0,b);a.lineTo(f,b);a.lineTo(f,0);a.lineTo(g,0);a.lineTo(g,b);a.lineTo(d,b);a.lineTo(d,
-c);a.lineTo(g,c);a.lineTo(g,e);a.lineTo(f,e);a.lineTo(f,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",pa);mxUtils.extend(qa,mxActor);qa.prototype.size=.25;qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",qa);mxUtils.extend(ma,
-mxConnector);ma.prototype.origPaintEdgeShape=ma.prototype.paintEdgeShape;ma.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,g=a.state.fixDash;ma.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,g),ma.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",
-ma);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),p=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-m/2-p/2,d.y-p/2+m/2);a.lineTo(d.x+
-p/2-3*m/2,d.y-3*p/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),p=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-m/2-p/2,d.y-p/2+m/2);a.lineTo(d.x+p/2-3*m/2,d.y-3*p/2-m/2);a.moveTo(d.x-m/2+p/2,d.y-p/2-m/2);a.lineTo(d.x-p/2-3*m/2,d.y-3*p/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Fa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,g,f,h,k,l){var m=d.clone(),p=Fa.apply(this,arguments),n=e*(f+2*k),K=g*(f+2*k);return function(){p.apply(this,
-arguments);a.begin();a.moveTo(m.x-e*k,m.y-g*k);a.lineTo(m.x-2*n+e*k,m.y-2*K+g*k);a.moveTo(m.x-n-K+g*k,m.y-K+n-e*k);a.lineTo(m.x+K-n-g*k,m.y-K-n+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,g,f,h,k,l){b=e*k*1.118;c=g*k*1.118;e*=f+k;g*=f+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-g-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-g/2,m.y-g+e/2):a.lineTo(m.x+g/2-e,m.y-g-e/2);a.lineTo(m.x-e,m.y-g);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",
-function(a){a=null!=a?a:2;return function(b,c,d,e,g,f,h,k,l,m){g*=h+l;f*=h+l;var p=e.clone();return function(){b.begin();b.moveTo(p.x,p.y);k?b.lineTo(p.x-g-f/a,p.y-f+g/a):b.lineTo(p.x+f/a-g,p.y-f-g/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ha=function(a,b,c){return ra(a,["width"],b,function(b,d,e,g,f){f=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(g.x+d*b/4+e*f/2,g.y+e*b/4-d*f/2)},function(b,d,e,g,f,h){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));a.style.width=
-Math.round(2*b)/a.view.scale-c})},ra=function(a,b,c,d,e){return N(a,b,function(b){var e=a.absolutePoints,g=e.length-1;b=a.view.translate;var f=a.view.scale,h=c?e[0]:e[g],e=c?e[1]:e[g-1],g=e.x-h.x,k=e.y-h.y,l=Math.sqrt(g*g+k*k),h=d.call(this,l,g/l,k/l,h,e);return new mxPoint(h.x/f-b.x,h.y/f-b.y)},function(b,d,g){var f=a.absolutePoints,h=f.length-1;b=a.view.translate;var k=a.view.scale,l=c?f[0]:f[h],f=c?f[1]:f[h-1],h=f.x-l.x,m=f.y-l.y,p=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
-p,h/p,m/p,l,f,d,g)})},ka=function(a){return function(b){return[N(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",W.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",W.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
-Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ea=function(a,b,c){return function(d){var e=[N(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ha(d));return e}},wa=function(a,b,c,d,e){c=null!=
+a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ca);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ta);mxUtils.extend(ua,mxActor);ua.prototype.redrawPath=
+function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",ua);mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var g=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-g)/2;c=b+g;var f=(d-g)/2,g=f+g;a.moveTo(0,b);a.lineTo(f,b);a.lineTo(f,0);a.lineTo(g,0);a.lineTo(g,b);a.lineTo(d,b);a.lineTo(d,
+c);a.lineTo(g,c);a.lineTo(g,e);a.lineTo(f,e);a.lineTo(f,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",oa);mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",pa);mxUtils.extend(la,
+mxConnector);la.prototype.origPaintEdgeShape=la.prototype.paintEdgeShape;la.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,g=a.state.fixDash;la.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,g),la.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",
+la);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),y=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-m/2-y/2,d.y-y/2+m/2);a.lineTo(d.x+
+y/2-3*m/2,d.y-3*y/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),y=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-m/2-y/2,d.y-y/2+m/2);a.lineTo(d.x+y/2-3*m/2,d.y-3*y/2-m/2);a.moveTo(d.x-m/2+y/2,d.y-y/2-m/2);a.lineTo(d.x-y/2-3*m/2,d.y-3*y/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Fa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,g,f,h,k,l){var m=d.clone(),y=Fa.apply(this,arguments),p=e*(f+2*k),n=g*(f+2*k);return function(){y.apply(this,
+arguments);a.begin();a.moveTo(m.x-e*k,m.y-g*k);a.lineTo(m.x-2*p+e*k,m.y-2*n+g*k);a.moveTo(m.x-p-n+g*k,m.y-n+p-e*k);a.lineTo(m.x+n-p-g*k,m.y-n-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,g,f,h,k,l){b=e*k*1.118;c=g*k*1.118;e*=f+k;g*=f+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-g-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-g/2,m.y-g+e/2):a.lineTo(m.x+g/2-e,m.y-g-e/2);a.lineTo(m.x-e,m.y-g);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",
+function(a){a=null!=a?a:2;return function(b,c,d,e,g,f,h,k,l,m){g*=h+l;f*=h+l;var y=e.clone();return function(){b.begin();b.moveTo(y.x,y.y);k?b.lineTo(y.x-g-f/a,y.y-f+g/a):b.lineTo(y.x+f/a-g,y.y-f-g/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ha=function(a,b,c){return qa(a,["width"],b,function(b,d,e,g,f){f=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(g.x+d*b/4+e*f/2,g.y+e*b/4-d*f/2)},function(b,d,e,g,f,h){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));a.style.width=
+Math.round(2*b)/a.view.scale-c})},qa=function(a,b,c,d,e){return N(a,b,function(b){var e=a.absolutePoints,g=e.length-1;b=a.view.translate;var f=a.view.scale,h=c?e[0]:e[g],e=c?e[1]:e[g-1],g=e.x-h.x,k=e.y-h.y,l=Math.sqrt(g*g+k*k),h=d.call(this,l,g/l,k/l,h,e);return new mxPoint(h.x/f-b.x,h.y/f-b.y)},function(b,d,g){var f=a.absolutePoints,h=f.length-1;b=a.view.translate;var k=a.view.scale,l=c?f[0]:f[h],f=c?f[1]:f[h-1],h=f.x-l.x,m=f.y-l.y,y=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
+y,h/y,m/y,l,f,d,g)})},ja=function(a){return function(b){return[N(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
+Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ea=function(a,b,c){return function(d){var e=[N(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ga(d));return e}},wa=function(a,b,c,d,e){c=null!=
c?c:1;return function(g){var f=[N(g,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=f?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));f&&!mxEvent.isAltDown(d.getEvent())&&(a=g.view.graph.snap(a));this.state.style.size=
-a},null,d)];b&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ha(g));return f}},Ia=function(a){return function(b){var c=[N(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ha(b));return c}},ta=function(){return function(a){var b=
-[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b}},ha=function(a,b){return N(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/
+a},null,d)];b&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ga(g));return f}},Ia=function(a){return function(b){var c=[N(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ga(b));return c}},sa=function(){return function(a){var b=
+[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b}},ga=function(a,b){return N(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/
100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},N=function(a,b,c,d,e,g){var f=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);
-f.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};f.getPosition=c;f.setPosition=d;f.ignoreGrid=null!=e?e:!0;if(g){var h=f.positionChanged;f.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return f},xa={link:function(a){return[Ha(a,!0,10),Ha(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,
+f.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};f.getPosition=c;f.setPosition=d;f.ignoreGrid=null!=e?e:!0;if(g){var h=f.positionChanged;f.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return f},xa={link:function(a){return[Ha(a,!0,10),Ha(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,
["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=
-Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(b,c,d,e,g){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*
+parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*
a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
-b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=
+b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=
Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[N(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),
-b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ha(a,c/2))}return b},
-label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var b=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
-"width",J.prototype.width))),c=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[N(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",r.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},cross:function(a){return[N(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ga(a,c/2))}return b},
+label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var b=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",K.prototype.width))),c=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[N(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",r.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},cross:function(a){return[N(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
-[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",X.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},dataStorage:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));
+[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",X.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},dataStorage:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));
return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[N(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
(b.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},internalStorage:function(a){var b=[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
-b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},corner:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},internalStorage:function(a){var b=[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},corner:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,b.y-a.y)))})]},singleArrow:ka(1),doubleArrow:ka(.5),folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
+Math.min(a.height,b.y-a.y)))})]},singleArrow:ja(1),doubleArrow:ja(.5),folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));
-return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(v.prototype.size,!0,null,!0,v.prototype.fixedSize),hexagon:wa(y.prototype.size,!0,.5,!0),curlyBracket:wa(n.prototype.size,!1),display:wa(qa.prototype.size,!1),cube:Ea(1,a.prototype.size,!1),card:Ea(.5,g.prototype.size,!0),loopLimit:Ea(.5,Y.prototype.size,!0),trapezoid:Ia(.5),parallelogram:Ia(1)};Graph.createHandle=N;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(v.prototype.size,!0,null,!0,v.prototype.fixedSize),hexagon:wa(z.prototype.size,!0,.5,!0),curlyBracket:wa(n.prototype.size,!1),display:wa(pa.prototype.size,!1),cube:Ea(1,a.prototype.size,!1),card:Ea(.5,g.prototype.size,!0),loopLimit:Ea(.5,Y.prototype.size,!0),trapezoid:Ia(.5),parallelogram:Ia(1)};Graph.createHandle=N;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=
function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=xa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=xa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
-this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=xa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,0),ka=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,Math.cos(ka),Math.sin(ka)),ka=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(ka),Math.sin(ka));mxEdgeStyle.IsometricConnector=function(a,b,
-c,d,e){var g=a.view;d=null!=d&&0<d.length?d[0]:null;var f=a.absolutePoints,h=f[0],f=f[f.length-1];null!=d&&(d=g.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ya.x,l=ya.y,m=za.x,p=za.y,n="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(p*a-m*d)/(k*p-l*m);a=(l*a-k*d)/(l*m-k*p);n?(c&&(q=new mxPoint(q.x+k*b,q.y+l*
-b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+p*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+p*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(f.x-h.x)/2,h.y+(f.y-h.y)/2));a(d.x,d.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Oa.apply(this,
-arguments)};c.prototype.constraints=[];d.prototype.constraints=[];w.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
-.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
-1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;
-a.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=
-mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,
-.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,
-0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,
-0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,
-.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];O.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=xa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,0),ja=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,Math.cos(ja),Math.sin(ja)),ja=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(ja),Math.sin(ja));mxEdgeStyle.IsometricConnector=function(a,b,
+c,d,e){var g=a.view;d=null!=d&&0<d.length?d[0]:null;var f=a.absolutePoints,h=f[0],f=f[f.length-1];null!=d&&(d=g.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ya.x,l=ya.y,m=za.x,p=za.y,n="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=h){a=function(a,b,c){a-=y.x;var d=b-y.y;b=(p*a-m*d)/(k*p-l*m);a=(l*a-k*d)/(l*m-k*p);n?(c&&(y=new mxPoint(y.x+k*b,y.y+l*
+b),e.push(y)),y=new mxPoint(y.x+m*a,y.y+p*a)):(c&&(y=new mxPoint(y.x+m*a,y.y+p*a),e.push(y)),y=new mxPoint(y.x+k*b,y.y+l*b));e.push(y)};var y=h;null==d&&(d=new mxPoint(h.x+(f.x-h.x)/2,h.y+(f.y-h.y)/2));a(d.x,d.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Oa.apply(this,
+arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,
+"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),
+!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,
+1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;
+f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};g.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(c-d)));return a};h.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;V.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;
+ua.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};Y.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,
+.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
+.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,
+.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,
+.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
+1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,
.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ba.prototype.constraints=null;aa.prototype.constraints=null;ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];F.prototype.constraints=null;fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ba.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};aa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+1),!1)];R.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};ka.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",R.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,c));return a};oa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,g=d+e,f=(b-e)/2,e=f+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d));return a};G.prototype.constraints=null;ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,
+.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){b.escape();var c=b.getDeletableCells(b.getSelectionCells());if(null!=c&&0<c.length){var d=b.model.getParents(c);b.removeCells(c,a);if(null!=d){a=[];for(c=0;c<d.length;c++)b.model.contains(d[c])&&(b.model.isVertex(d[c])||b.model.isEdge(d[c]))&&a.push(d[c]);b.setSelectionCells(a)}}}var c=this.editorUi,d=c.editor,b=d.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",function(){b.openLink(c.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);d.graph.setSelectionCells(d.graph.importGraphModel(c.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}));c.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=f;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
@@ -3237,11 +3256,11 @@ c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="borde
"pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<l.length;c++){if(l[c]==a){m[c]=null;g.table.deleteRow(b+(null!=n?1:0));break}null!=m[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},h=function(a,b,c){l[a]=b;m[a]=g.addTextarea(l[p]+":",c,2);m[a].style.width="100%";u(m[a],b)},q=[],r=f.getModel().getParent(c)==f.getModel().getRoot(),t=0;t<k.length;t++)!r&&"label"==k[t].nodeName||"placeholders"==k[t].nodeName||
q.push({name:k[t].nodeName,value:k[t].nodeValue});q.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});null!=n&&(k=document.createElement("input"),k.style.width="280px",k.style.textAlign="center",k.setAttribute("type","text"),k.setAttribute("readOnly","true"),k.setAttribute("value",n),g.addField(mxResources.get("id")+":",k));for(t=0;t<q.length;t++)h(p,q[t].name,q[t].value),p++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";
h.appendChild(g.table);q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.marginTop="6px";var w=document.createElement("input");w.setAttribute("placeholder",mxResources.get("enterPropertyName"));w.setAttribute("type","text");w.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"18":"22");w.style.marginLeft="2px";q.appendChild(w);h.appendChild(q);b.appendChild(h);var v=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(0<a.length&&"label"!=a&&"placeholders"!=
-a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);u(c,a);c.focus()}w.value=""}catch(D){mxUtils.alert(D)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<m.length?m[0].focus():w.focus()};v.setAttribute("disabled","disabled");v.style.marginLeft="10px";v.style.width="144px";q.appendChild(v);h=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";q=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(C){mxUtils.alert(C)}});q.className="geBtn gePrimaryBtn";mxEvent.addListener(w,
+a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);u(c,a);c.focus()}w.value=""}catch(E){mxUtils.alert(E)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<m.length?m[0].focus():w.focus()};v.setAttribute("disabled","disabled");v.style.marginLeft="10px";v.style.width="144px";q.appendChild(v);h=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";q=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(D){mxUtils.alert(D)}});q.className="geBtn gePrimaryBtn";mxEvent.addListener(w,
"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){r=document.createElement("span");r.style.marginRight="10px";t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);
-mxEvent.addListener(t,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});r.appendChild(t);mxUtils.write(r,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){t=document.createElement("a");t.setAttribute("href",EditDataDialog.placeholderHelpLink);t.setAttribute("title",mxResources.get("help"));t.setAttribute("target","_blank");t.style.marginLeft="8px";t.style.cursor="help";var y=document.createElement("img");
-mxUtils.setOpacity(y,50);y.style.height="16px";y.style.width="16px";y.setAttribute("border","0");y.setAttribute("valign","middle");y.style.marginTop=mxClient.IS_IE11?"0px":"-4px";y.setAttribute("src",Editor.helpImage);t.appendChild(y);r.appendChild(t)}k.appendChild(r)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(q)):(k.appendChild(q),k.appendChild(h));b.appendChild(k);this.container=b};
+mxEvent.addListener(t,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});r.appendChild(t);mxUtils.write(r,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){t=document.createElement("a");t.setAttribute("href",EditDataDialog.placeholderHelpLink);t.setAttribute("title",mxResources.get("help"));t.setAttribute("target","_blank");t.style.marginLeft="8px";t.style.cursor="help";var z=document.createElement("img");
+mxUtils.setOpacity(z,50);z.style.height="16px";z.style.width="16px";z.setAttribute("border","0");z.setAttribute("valign","middle");z.style.marginTop=mxClient.IS_IE11?"0px":"-4px";z.setAttribute("src",Editor.helpImage);t.appendChild(z);r.appendChild(t)}k.appendChild(r)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(q)):(k.appendChild(q),k.appendChild(h));b.appendChild(k);this.container=b};
EditDataDialog.getDisplayIdForCell=function(a,c){var d=null;null!=a.editor.graph.getModel().getParent(c)&&(d=c.getId());return d};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,c,d,b){var f=document.createElement("div");mxUtils.write(f,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type",
"text");h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
@@ -3261,14 +3280,14 @@ Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEven
b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9660;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,
a-1);mxEvent.consume(b)})),0<=a&&a<u-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&
(f.setAttribute("draggable","true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="white"==Dialog.backdropColor?"#e6eff8":"#505759",f.style.fontWeight=g.isEnabled()?"bold":"",q=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}u=g.model.getChildCount(g.model.root);
-m.innerHTML="";for(var b=u-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));var c=g.convertValueToString(q)||mxResources.get("background");t.setAttribute("title",mxResources.get("removeIt",[c]));w.setAttribute("title",mxResources.get("moveSelectionTo",[c]));y.setAttribute("title",mxResources.get("duplicateIt",[c]));v.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}
+m.innerHTML="";for(var b=u-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));var c=g.convertValueToString(q)||mxResources.get("background");t.setAttribute("title",mxResources.get("removeIt",[c]));w.setAttribute("title",mxResources.get("moveSelectionTo",[c]));z.setAttribute("title",mxResources.get("duplicateIt",[c]));v.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}
console.log("dialog.bg",Dialog.backdropColor);var g=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="white"==Dialog.backdropColor?"#dcdcdc":Dialog.backdropColor;m.style.position="absolute";
m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px";k.appendChild(m);var p=null,n=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";n=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var u=null,q=null,r=document.createElement("div");r.className="geToolbarContainer";r.style.position="absolute";r.style.bottom="0px";r.style.left="0px";
r.style.right="0px";r.style.height=l;r.style.overflow="hidden";r.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";r.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;r.style.borderWidth="1px 0px 0px 0px";r.style.borderColor="#c3c3c3";r.style.borderStyle="solid";r.style.display="block";r.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(r.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var t=
l.cloneNode();t.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(t,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(q);g.removeCells([q],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});
g.isEnabled()||(t.className="geButton mxDisabled");r.appendChild(t);var w=l.cloneNode();w.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(a){g.isEnabled()&&!g.isSelectionEmpty()&&g.moveCells(g.getSelectionCells(),0,0,!1,q)});r.appendChild(w);var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(v,"click",
-function(b){g.isEnabled()&&a.showDataDialog(q);mxEvent.consume(b)});g.isEnabled()||(v.className="geButton mxDisabled");r.appendChild(v);var y=l.cloneNode();y.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(y,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(q),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==
-a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(y.className="geButton mxDisabled");r.appendChild(y);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||
+function(b){g.isEnabled()&&a.showDataDialog(q);mxEvent.consume(b)});g.isEnabled()||(v.className="geButton mxDisabled");r.appendChild(v);var z=l.cloneNode();z.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(z,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(q),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==
+a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(z.className="geButton mxDisabled");r.appendChild(z);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||
(l.className="geButton mxDisabled");r.appendChild(l);k.appendChild(r);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?w.className="geButton mxDisabled":w.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var x=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();
this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",x);this.destroy=function(){mxEvent.removeListener(window,"resize",x);this.window.destroy()}};
@@ -7399,18 +7418,19 @@ this.getTagsForStencil("mxgraph.weblogos","xanga","web logos logo").join(" ")),t
74.4,43.6,"","Yahoo",null,null,this.getTagsForStencil("mxgraph.weblogos","yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yahoo_2;fillColor=#65106E;strokeColor=none",80,46.6,"","Yahoo",null,null,this.getTagsForStencil("mxgraph.weblogos","yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+
"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos","yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",
76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))])}})();
-DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=c||"";this.stats={joined:0,merged:0,lastMerge:0,lastMergeTime:0,lastOpenTime:0,shadowState:0,opened:0,closed:0,destroyed:0,fileMerged:0,fileSaved:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=c||"";this.stats={joined:0,merged:0,lastMerge:0,lastMergeTime:0,lastOpenTime:0,lastIgnored:0,shadowState:0,opened:0,closed:0,destroyed:0,fileMerged:0,fileSaved:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;
DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
DrawioFile.prototype.updateFile=function(a,c,b,d){null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c(e):this.getLatestVersion(mxUtils.bind(this,function(f){try{null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c(e):null!=f?this.mergeFile(f,a,c,d):this.reloadFile(a,c))}catch(h){null!=c&&c(h)}}),c))};
-DrawioFile.prototype.mergeFile=function(a,c,b,d){try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkPages(f,"mergeFile init");this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var h=[this.ui.diffPages(null!=d?d:f,this.shadowPages)];if(this.ignorePatches(h))this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());
-else{var k=this.ui.patchPages(f,h[0]);this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());this.checkPages(k,"mergeFile patched");d={};var m=this.ui.getHashValueForPages(k,d),f={},p=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",h,"checksum",p==m,m);if(null!=m&&m!=p){var g=this.compressReportData(this.getAnonymizedXmlForPages(k));this.checksumError(b,h,(null!=d?"Details: "+JSON.stringify(d):"")+
-"\nChecksum: "+m+"\nCurrent: "+p+(null!=f?"\nCurrent Details: "+JSON.stringify(f):"")+"\nPatched:\n"+g);return}this.patch(h,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages(this.ui.pages,"mergeFile done")}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(l){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=b&&b(l);try{this.sendErrorReport("Error in mergeFile",
-null,l)}catch(n){}}};DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),b=c.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var f=c.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(f=this.ui.anonymizeNode(f,!0));f.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,f,!0);b.appendChild(f)}return mxUtils.getPrettyXml(b)};
+DrawioFile.prototype.mergeFile=function(a,c,b,d){try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkPages(f,"mergeFile init");var h=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=h&&0<h.length){this.shadowPages=h;this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var k=[this.ui.diffPages(null!=d?d:f,this.shadowPages)];if(this.ignorePatches(k))this.stats.shadowState=
+this.ui.hashValue(a.getCurrentEtag());else{var m=this.ui.patchPages(f,k[0]);this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());this.checkPages(m,"mergeFile patched");d={};var p=this.ui.getHashValueForPages(m,d),f={},g=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",k,"checksum",g==p,p);if(null!=p&&p!=g){var l=this.compressReportData(this.getAnonymizedXmlForPages(m));this.checksumError(b,k,(null!=
+d?"Details: "+JSON.stringify(d):"")+"\nChecksum: "+p+"\nCurrent: "+g+(null!=f?"\nCurrent Details: "+JSON.stringify(f):"")+"\nPatched:\n"+l);return}this.patch(k,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages(this.ui.pages,"mergeFile done")}}else try{0==this.stats.lastIgnored&&this.sendErrorReport("Ignored empty pages in mergeFile","File Data: "+this.compressReportData(this.ui.anonymizeString(a.data),null,500)),this.stats.lastIgnored=(new Date).toISOString()}catch(n){}this.inConflictState=
+this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=b&&b(n);try{this.sendErrorReport("Error in mergeFile",null,n)}catch(q){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),b=c.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var f=c.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(f=this.ui.anonymizeNode(f,!0));f.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,f,!0);b.appendChild(f)}return mxUtils.getPrettyXml(b)};
DrawioFile.prototype.checkPages=function(a,c){if(this.ui.getCurrentFile()==this&&(null==a||0==a.length)){var b=null==this.shadowData?"null":this.compressReportData(this.ui.anonymizeString(this.shadowData),null,5E3);this.sendErrorReport("Pages is null or empty","Shadow: "+(null!=a?a.length:"null")+"\nShadowPages: "+(null!=this.shadowPages?this.shadowPages.length:"null")+(null!=c?"\nInfo: "+c:"")+"\nShadowData: "+b)}};
DrawioFile.prototype.compressReportData=function(a,c,b){null!=a&&a.length>(null!=c?c:1E4)&&(a=this.ui.editor.graph.compress(a)+"\n");null!=b&&null!=a&&a.length>b&&(a=a.substring(0,b)+"[...]");return a};
DrawioFile.prototype.checksumError=function(a,c,b,d){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var f=Error(),h=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nHeadRevision:\n"+a:""),f,7E4)});null==d?h(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?h(a):h(null)}),function(){})}catch(k){}};
+25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nMaster:\n"+a:""),f,7E4)});null==d?h(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?h(a):h(null)}),function(){})}catch(k){}};
DrawioFile.prototype.sendErrorReport=function(a,c,b,d){try{var f=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),h=this.getCurrentUser(),k=null!=h?this.ui.hashValue(h.id):"unknown",m=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var p=this.getTitle(),g=p.lastIndexOf("."),h="xml";0<g&&(h=p.substring(g));var l=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+
" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+h+")\nUser="+k+" ("+m+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+(null!=b?"\nError="+b:"")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nShadow:\n"+f+"\n\nStack:\n"+l,d)}catch(n){}};
DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var b=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),h=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(h,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);
@@ -7448,8 +7468,8 @@ DrawioFile.prototype.handleConflictError=function(a,c){var b=mxUtils.bind(this,f
function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,b,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(b,d,f):this.invalidChecksum?this.showRefreshDialog(b,d,this.getErrorMessage(a)):c?this.showConflictDialog(f,h):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(b,
d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};
DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null==this.autosaveThread&&this.handleFileSuccess(!0)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus()};
-DrawioFile.prototype.fileSaved=function(a,c,b,d){try{this.stats.fileSaved++,this.invalidChecksum=this.inConflictState=!1,this.checkPages(this.ui.pages,"fileSaved"),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,d)}catch(f){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(f);try{this.sendErrorReport("Error in fileSaved","SavedData:\n"+this.compressReportData(this.ui.anonymizeString(a),
-5E3),f)}catch(h){}}};
+DrawioFile.prototype.fileSaved=function(a,c,b,d){try{this.stats.fileSaved++,this.invalidChecksum=this.inConflictState=!1,this.checkPages(this.ui.pages,"fileSaved"),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,d)}catch(f){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(f);try{this.sendErrorReport("Error in fileSaved","Saved Data:\n"+this.compressReportData(this.ui.anonymizeString(a),
+null,500),f)}catch(h){}}};
DrawioFile.prototype.autosave=function(a,c,b,d){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<c?a:0;this.clearAutosave();var f=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==f&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=
b&&b(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=b&&b(null)}),a);this.autosaveThread=f};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -7466,51 +7486,52 @@ StorageFile.prototype.saveFile=function(a,c,b,d){if(this.isEditable()){var f=mxU
StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.getLatestVersion=function(a,c){this.ui.getLocalData(this.title,mxUtils.bind(this,function(b){a(new StorageFile(this.ui,b,this.title))}))};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,c,b){StorageFile.call(this,a,c,b)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,c,b){this.saveFile(a,!1,c,b)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(a,c,b){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,c,b){StorageFile.call(this,a,c,b);a=b;c=a.lastIndexOf("/");0<=c&&(a=a.substring(c+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,c,b){return!1};UrlLibrary.prototype.saveAs=function(a,c,b){};UrlLibrary.prototype.open=function(){};/*
mxClient.IS_IOS || */
-var StorageDialog=function(a,c,b){function d(d,f,v,h,q,t){function E(){mxEvent.addListener(x,"click",null!=t?t:function(){v!=App.MODE_GOOGLE||a.isDriveDomain()?v==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(v,g.checked);c()})):(a.setMode(v,g.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height="100px";x.style.whiteSpace="nowrap";x.setAttribute("title",f);mxClient.IS_QUIRKS&&(x.style.cssFloat="left",x.style.zoom="1");var w=document.createElement("div");w.style.textOverflow="ellipsis";w.style.overflow="hidden";if(null!=d){var u=document.createElement("img");
-u.setAttribute("src",d);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";x.appendChild(u)}else w.style.paddingTop="5px",w.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(w.style.paddingTop="0px",w.style.marginTop="-2px");x.appendChild(w);mxUtils.write(w,f);if(null!=q)for(d=0;d<q.length;d++)mxUtils.br(w),mxUtils.write(w,q[d]);if(null!=h&&null==a[h]){u.style.visibility=
-"hidden";mxUtils.setOpacity(w,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(x);var F=window.setTimeout(function(){null==a[h]&&(k.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(F),mxUtils.setOpacity(w,100),u.style.visibility="",k.stop(),E(),"drive"==h&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else E();
-p.appendChild(x);++l>=b&&(mxUtils.br(p),l=0)}b=null!=b?b:2;var f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";f.style.paddingTop="0px";f.style.paddingBottom="20px";var h=a.addLanguageMenu(f,!0);null!=h&&(h.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){h=document.createElement("a");h.setAttribute("href","https://about.draw.io/support/");h.setAttribute("title",mxResources.get("help"));h.setAttribute("target","_blank");h.style.position=
-"absolute";h.style.textDecoration="none";h.style.cursor="pointer";h.style.fontSize="12px";h.style.bottom="28px";h.style.left="26px";h.style.color="gray";var k=document.createElement("img");mxUtils.setOpacity(k,50);k.style.height="16px";k.style.width="16px";k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";h.appendChild(k);mxUtils.write(h,mxResources.get("help"));f.appendChild(h)}var m=document.createElement("div");m.style.position=
-"absolute";m.style.cursor="pointer";m.style.fontSize="12px";m.style.bottom="28px";m.style.color="gray";mxUtils.write(m,mxResources.get("decideLater"));a.isOfflineApp()?m.style.right="20px":(mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0)"),m.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)m.style.marginLeft=-Math.round(m.clientWidth/2)+"px"};f.appendChild(m);mxEvent.addListener(m,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;
-a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var p=document.createElement("div");mxClient.IS_QUIRKS&&(p.style.whiteSpace="nowrap",p.style.cssFloat="left");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";p.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;var l=0,n=document.createElement("p"),h=document.createElement("p");
-h.style.fontSize="16pt";h.style.padding="0px";h.style.paddingTop="4px";h.style.paddingBottom="16px";h.style.margin="0px";h.style.color="gray";mxUtils.write(h,mxResources.get("saveDiagramsTo")+":");f.appendChild(h);"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");d(IMAGE_PATH+"/osa_drive-harddisk.png",
-mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);f.appendChild(p);h=document.createElement("p");h.style.marginTop="12px";h.style.marginBottom="6px";h.appendChild(g);k=document.createElement("span");k.style.color="gray";k.style.fontSize="12px";mxUtils.write(k," "+mxResources.get("rememberThisSetting"));h.appendChild(k);mxUtils.br(h);var q=a.getRecent();if(null!=q&&
-0<q.length){var t=document.createElement("select");t.style.marginTop="8px";t.style.width="140px";var u=document.createElement("option");u.setAttribute("value","");u.setAttribute("selected","selected");u.style.textAlign="center";mxUtils.write(u,mxResources.get("openRecent")+"...");t.appendChild(u);for(u=0;u<q.length;u++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,
-a.title+" ("+mxResources.get(b)+")");t.appendChild(c)})(q[u]);h.appendChild(t);mxEvent.addListener(t,"change",function(b){""!=t.value&&a.loadFile(t.value)})}else h.style.marginTop="20px",p.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
-", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),h.appendChild(q),p.style.paddingBottom="4px");p.appendChild(h);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
-document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",f.appendChild(n))},5E3);this.container=
-f},SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";a.addLanguageMenu(c,!0);var b=null,b=a.getServiceCount();if(!a.isOffline()&&1<b){b=document.createElement("a");b.setAttribute("href","https://about.draw.io/support/");b.setAttribute("title",mxResources.get("help"));b.setAttribute("target","_blank");b.style.position="absolute";b.style.fontSize="12px";b.style.textDecoration="none";b.style.cursor="pointer";b.style.bottom="22px";b.style.left="26px";b.style.color=
-"gray";var d=document.createElement("img");mxUtils.setOpacity(d,50);d.style.height="16px";d.style.width="16px";d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);d.style.marginRight="2px";b.appendChild(d);mxUtils.write(b,mxResources.get("help"));c.appendChild(b)}b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";d=document.createElement("img");d.setAttribute("border",
-"0");d.setAttribute("align","absmiddle");d.style.width="40px";d.style.height="40px";d.style.marginRight="12px";d.style.paddingBottom="4px";var f="";a.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+"/github-logo.svg",f=
-mxResources.get("github")):a.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",f=mxResources.get("device"));var h=document.createElement("div");h.style.margin="4px 0px 0px 0px";var k=document.createElement("button");k.className="geBigButton";k.style.overflow="hidden";k.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
-(h.style.padding="42px 0px 56px 0px",k.style.marginBottom="12px"):(b.appendChild(d),mxUtils.write(b,f),c.appendChild(b),h.style.border="1px solid #d3d3d3",h.style.borderWidth="1px 0px 1px 0px",h.style.padding="18px 0px 24px 0px",k.style.marginBottom="8px");mxClient.IS_QUIRKS&&(h.style.whiteSpace="nowrap",h.style.cssFloat="left");mxClient.IS_QUIRKS&&(k.style.width="340px");mxUtils.write(k,mxResources.get("createNewDiagram"));mxEvent.addListener(k,"click",function(){a.hideDialog();a.actions.get("new").funct()});
-h.appendChild(k);mxUtils.br(h);k=document.createElement("button");k.className="geBigButton";k.style.marginBottom="22px";k.style.overflow="hidden";k.style.width="340px";mxClient.IS_QUIRKS&&(k.style.width="340px");mxUtils.write(k,mxResources.get("openExistingDiagram"));mxEvent.addListener(k,"click",function(){a.actions.get("open").funct()});h.appendChild(k);b="undefined";a.mode==App.MODE_GOOGLE?b=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?b=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?
-b=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?b=mxResources.get("github"):a.mode==App.MODE_TRELLO?b=mxResources.get("trello"):a.mode==App.MODE_DEVICE?b=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(b=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(f=function(b){k.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="inline-block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));
-k.style.marginBottom="16px";h.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});h.appendChild(c)},d=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=d?(k.style.marginBottom="24px",f=document.createElement("a"),f.setAttribute("href","javascript:void(0)"),f.style.display="inline-block",f.style.marginTop="6px",mxUtils.write(f,mxResources.get("changeUser")+" ("+d.displayName+")"),k.style.marginBottom="16px",
-h.style.paddingBottom="18px",mxEvent.addListener(f,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),h.appendChild(f)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?f(function(){a.oneDrive.logout()}):
-a.mode==App.MODE_GITHUB&&null!=a.gitHub?f(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&f(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&f(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),mxUtils.br(h),f=document.createElement("a"),f.setAttribute("href","javascript:void(0)"),f.style.display="inline-block",f.style.marginTop="8px",mxUtils.write(f,mxResources.get("notUsingService",
-[b])),mxEvent.addListener(f,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),h.appendChild(f));c.appendChild(h);this.container=c},ConfirmDialog=function(a,c,b,d,f,h,k,m,p){var g=document.createElement("div");g.style.textAlign="center";var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight="44px";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);g.appendChild(l);l=document.createElement("div");l.style.textAlign=
-"center";l.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");h=mxUtils.button(h||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(n.checked)});h.className="geBtn";null!=m&&(h.innerHTML=m+"<br>"+h.innerHTML,h.style.paddingBottom="8px",h.style.paddingTop="8px",h.style.height="auto",h.style.width="40%");a.editor.cancelFirst&&l.appendChild(h);var q=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(n.checked)});l.appendChild(q);
-null!=k?(q.innerHTML=k+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||l.appendChild(h);g.appendChild(l);p?(l.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(n),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),l.appendChild(f),g.appendChild(l),mxEvent.addListener(f,
-"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):l.style.marginTop="16px";this.init=function(){q.focus()};this.container=g},EmbedDialog=function(a,c,b,d,f,h){d=document.createElement("div");var k=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=h?mxUtils.write(d,h):mxUtils.write(d,mxResources.get(5E5>c.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";
-mxUtils.write(h,a.formatFileSize(c.length));d.appendChild(h);var m=document.createElement("textarea");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.marginTop="10px";m.style.resize="none";m.style.height="150px";m.style.width="440px";m.style.border="1px solid gray";m.value=mxResources.get("updatingDocument");d.appendChild(m);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>
-c.length?(m.value=c,m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):(m.setAttribute("readonly","true"),m.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var p=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||
-9<document.documentMode))||(p=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var g=5E5>c.length?m.value:c;if(null!=f)f(g);else if(k)try{var d=a.openLink(g);null!=d&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=d&&null!=d.location.href&&d.location.href.substring(0,8)!=g.substring(0,8)&&(d.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var l=
-window.open().document;l.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>");l.close()}}),p.className="geBtn",h.appendChild(p));if(!k||7500<c.length){var g=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});g.className="geBtn";h.appendChild(g)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var l=mxUtils.button("",function(){try{var b=
-"https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height","18");g.setAttribute("border","0");l.appendChild(g);l.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");l.style.verticalAlign="bottom";l.style.paddingTop="4px";l.style.minWidth=
-"46px";l.className="geBtn";h.appendChild(l)}7168>c.length&&(l=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(m.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width","18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom=
-"5px",l.appendChild(g),l.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),l.style.verticalAlign="bottom",l.style.paddingTop="4px",l.style.minWidth="46px",l.className="geBtn",h.appendChild(l))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(g);l=mxUtils.button(mxResources.get("copy"),function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,
-null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?g.className="geBtn gePrimaryBtn":(h.appendChild(l),l.className="geBtn gePrimaryBtn",g.className="geBtn"):(h.appendChild(p),g.className="geBtn",p.className="geBtn gePrimaryBtn");d.appendChild(h);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,c){function b(){var a=null!=A&&null!=A.getTitle()?A.getTitle():this.defaultFilename;if(F.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<z.length&&(b+="&s="+z);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(u.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(E.checked?"1":"0");
-b+="&resize="+(x.checked?"1":"0");b+="&x0="+Number(l.value);b+="&y0="+p;f.mathEnabled&&(b+="&math=1");v.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+var StorageDialog=function(a,c,b){function d(d,f,u,h,q,t){function E(){mxEvent.addListener(x,"click",null!=t?t:function(){u!=App.MODE_GOOGLE||a.isDriveDomain()?u==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(u,g.checked);c()})):u==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(u,g.checked);
+c()})):(a.setMode(u,g.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height="100px";x.style.whiteSpace="nowrap";x.setAttribute("title",f);mxClient.IS_QUIRKS&&
+(x.style.cssFloat="left",x.style.zoom="1");var w=document.createElement("div");w.style.textOverflow="ellipsis";w.style.overflow="hidden";if(null!=d){var v=document.createElement("img");v.setAttribute("src",d);v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.width="60px";v.style.height="60px";v.style.paddingBottom="6px";x.appendChild(v)}else w.style.paddingTop="5px",w.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&
+(w.style.paddingTop="0px",w.style.marginTop="-2px");x.appendChild(w);mxUtils.write(w,f);if(null!=q)for(d=0;d<q.length;d++)mxUtils.br(w),mxUtils.write(w,q[d]);if(null!=h&&null==a[h]){v.style.visibility="hidden";mxUtils.setOpacity(w,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(x);var F=window.setTimeout(function(){null==a[h]&&(k.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",
+mxUtils.bind(this,function(b,c){null!=a[h]&&c.getProperty("client")==a[h]&&(window.clearTimeout(F),mxUtils.setOpacity(w,100),v.style.visibility="",k.stop(),E(),"drive"==h&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else E();p.appendChild(x);++l>=b&&(mxUtils.br(p),l=0)}b=null!=b?b:2;var f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";f.style.paddingTop="0px";f.style.paddingBottom="20px";var h=a.addLanguageMenu(f,!0);null!=h&&(h.style.bottom=parseInt("28px")-
+2+"px");if(!a.isOffline()&&1<a.getServiceCount()){h=document.createElement("a");h.setAttribute("href","https://about.draw.io/support/");h.setAttribute("title",mxResources.get("help"));h.setAttribute("target","_blank");h.style.position="absolute";h.style.textDecoration="none";h.style.cursor="pointer";h.style.fontSize="12px";h.style.bottom="28px";h.style.left="26px";h.style.color="gray";var k=document.createElement("img");mxUtils.setOpacity(k,50);k.style.height="16px";k.style.width="16px";k.setAttribute("border",
+"0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";h.appendChild(k);mxUtils.write(h,mxResources.get("help"));f.appendChild(h)}var m=document.createElement("div");m.style.position="absolute";m.style.cursor="pointer";m.style.fontSize="12px";m.style.bottom="28px";m.style.color="gray";mxUtils.write(m,mxResources.get("decideLater"));a.isOfflineApp()?m.style.right="20px":(mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0)"),m.style.left=
+"50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)m.style.marginLeft=-Math.round(m.clientWidth/2)+"px"};f.appendChild(m);mxEvent.addListener(m,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var p=document.createElement("div");mxClient.IS_QUIRKS&&(p.style.whiteSpace="nowrap",p.style.cssFloat="left");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";
+p.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;var l=0,n=document.createElement("p"),h=document.createElement("p");h.style.fontSize="16pt";h.style.padding="0px";h.style.paddingTop="4px";h.style.paddingBottom="16px";h.style.margin="0px";h.style.color="gray";mxUtils.write(h,mxResources.get("saveDiagramsTo")+":");f.appendChild(h);"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",
+mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);f.appendChild(p);h=document.createElement("p");h.style.marginTop="12px";h.style.marginBottom=
+"6px";h.appendChild(g);k=document.createElement("span");k.style.color="gray";k.style.fontSize="12px";mxUtils.write(k," "+mxResources.get("rememberThisSetting"));h.appendChild(k);mxUtils.br(h);var q=a.getRecent();if(null!=q&&0<q.length){var t=document.createElement("select");t.style.marginTop="8px";t.style.width="140px";var v=document.createElement("option");v.setAttribute("value","");v.setAttribute("selected","selected");v.style.textAlign="center";mxUtils.write(v,mxResources.get("openRecent")+"...");
+t.appendChild(v);for(v=0;v<q.length;v++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,a.title+" ("+mxResources.get(b)+")");t.appendChild(c)})(q[v]);h.appendChild(t);mxEvent.addListener(t,"change",function(b){""!=t.value&&a.loadFile(t.value)})}else h.style.marginTop="20px",p.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=
+document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),
+a.openFiles(b.files,!0))});b.click()}),h.appendChild(q),p.style.paddingBottom="4px");p.appendChild(h);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+
+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",f.appendChild(n))},5E3);this.container=f},SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";a.addLanguageMenu(c,!0);var b=null,b=a.getServiceCount();if(!a.isOffline()&&1<b){b=document.createElement("a");b.setAttribute("href","https://about.draw.io/support/");b.setAttribute("title",mxResources.get("help"));b.setAttribute("target","_blank");b.style.position=
+"absolute";b.style.fontSize="12px";b.style.textDecoration="none";b.style.cursor="pointer";b.style.bottom="22px";b.style.left="26px";b.style.color="gray";var d=document.createElement("img");mxUtils.setOpacity(d,50);d.style.height="16px";d.style.width="16px";d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);d.style.marginRight="2px";b.appendChild(d);mxUtils.write(b,mxResources.get("help"));c.appendChild(b)}b=document.createElement("p");b.style.fontSize=
+"16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="40px";d.style.height="40px";d.style.marginRight="12px";d.style.paddingBottom="4px";var f="";a.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):a.mode==
+App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):a.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",f=mxResources.get("device"));var h=document.createElement("div");h.style.margin="4px 0px 0px 0px";
+var k=document.createElement("button");k.className="geBigButton";k.style.overflow="hidden";k.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(h.style.padding="42px 0px 56px 0px",k.style.marginBottom="12px"):(b.appendChild(d),mxUtils.write(b,f),c.appendChild(b),h.style.border="1px solid #d3d3d3",h.style.borderWidth="1px 0px 1px 0px",h.style.padding="18px 0px 24px 0px",k.style.marginBottom="8px");mxClient.IS_QUIRKS&&(h.style.whiteSpace="nowrap",h.style.cssFloat="left");mxClient.IS_QUIRKS&&
+(k.style.width="340px");mxUtils.write(k,mxResources.get("createNewDiagram"));mxEvent.addListener(k,"click",function(){a.hideDialog();a.actions.get("new").funct()});h.appendChild(k);mxUtils.br(h);k=document.createElement("button");k.className="geBigButton";k.style.marginBottom="22px";k.style.overflow="hidden";k.style.width="340px";mxClient.IS_QUIRKS&&(k.style.width="340px");mxUtils.write(k,mxResources.get("openExistingDiagram"));mxEvent.addListener(k,"click",function(){a.actions.get("open").funct()});
+h.appendChild(k);b="undefined";a.mode==App.MODE_GOOGLE?b=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?b=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?b=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?b=mxResources.get("github"):a.mode==App.MODE_TRELLO?b=mxResources.get("trello"):a.mode==App.MODE_DEVICE?b=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(b=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(f=function(b){k.style.marginBottom="24px";
+var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="inline-block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));k.style.marginBottom="16px";h.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});h.appendChild(c)},d=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=d?(k.style.marginBottom="24px",f=document.createElement("a"),f.setAttribute("href",
+"javascript:void(0)"),f.style.display="inline-block",f.style.marginTop="6px",mxUtils.write(f,mxResources.get("changeUser")+" ("+d.displayName+")"),k.style.marginBottom="16px",h.style.paddingBottom="18px",mxEvent.addListener(f,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,
+null,function(){a.hideDialog();a.showSplash()})}))}),h.appendChild(f)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?f(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?f(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&f(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&f(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),mxUtils.br(h),
+f=document.createElement("a"),f.setAttribute("href","javascript:void(0)"),f.style.display="inline-block",f.style.marginTop="8px",mxUtils.write(f,mxResources.get("notUsingService",[b])),mxEvent.addListener(f,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),h.appendChild(f));c.appendChild(h);this.container=c},ConfirmDialog=function(a,c,b,d,f,h,k,m,p){var g=document.createElement("div");g.style.textAlign="center";var l=document.createElement("div");l.style.padding=
+"6px";l.style.overflow="auto";l.style.maxHeight="44px";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);g.appendChild(l);l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");h=mxUtils.button(h||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(n.checked)});h.className="geBtn";null!=m&&(h.innerHTML=m+"<br>"+h.innerHTML,h.style.paddingBottom="8px",h.style.paddingTop="8px",
+h.style.height="auto",h.style.width="40%");a.editor.cancelFirst&&l.appendChild(h);var q=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(n.checked)});l.appendChild(q);null!=k?(q.innerHTML=k+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||l.appendChild(h);g.appendChild(l);p?(l.style.marginTop="10px",l=document.createElement("p"),
+l.style.marginTop="20px",l.appendChild(n),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),l.appendChild(f),g.appendChild(l),mxEvent.addListener(f,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):l.style.marginTop="16px";this.init=function(){q.focus()};this.container=g},EmbedDialog=function(a,c,b,d,f,h){d=document.createElement("div");var k=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=h?mxUtils.write(d,h):mxUtils.write(d,mxResources.get(5E5>
+c.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(c.length));d.appendChild(h);var m=document.createElement("textarea");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.marginTop="10px";m.style.resize="none";m.style.height="150px";
+m.style.width="440px";m.style.border="1px solid gray";m.value=mxResources.get("updatingDocument");d.appendChild(m);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>c.length?(m.value=c,m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):(m.setAttribute("readonly","true"),m.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position=
+"absolute";h.style.bottom="36px";h.style.right="32px";var p=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var g=5E5>c.length?m.value:c;if(null!=f)f(g);else if(k)try{var d=a.openLink(g);null!=d&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=d&&null!=d.location.href&&d.location.href.substring(0,
+8)!=g.substring(0,8)&&(d.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var l=window.open().document;l.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>");l.close()}}),p.className="geBtn",h.appendChild(p));if(!k||7500<c.length){var g=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();
+a.saveData("embed.txt","txt",c,"text/plain")});g.className="geBtn";h.appendChild(g)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var l=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height","18");g.setAttribute("border",
+"0");l.appendChild(g);l.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");l.style.verticalAlign="bottom";l.style.paddingTop="4px";l.style.minWidth="46px";l.className="geBtn";h.appendChild(l)}7168>c.length&&(l=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(m.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),
+g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width","18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",l.appendChild(g),l.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),l.style.verticalAlign="bottom",l.style.paddingTop="4px",l.style.minWidth="46px",l.className="geBtn",h.appendChild(l))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(g);l=mxUtils.button(mxResources.get("copy"),
+function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?g.className="geBtn gePrimaryBtn":(h.appendChild(l),l.className="geBtn gePrimaryBtn",g.className="geBtn"):(h.appendChild(p),g.className="geBtn",p.className="geBtn gePrimaryBtn");d.appendChild(h);this.container=d};
+EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(a,c){function b(){var a=null!=A&&null!=A.getTitle()?A.getTitle():this.defaultFilename;if(F.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<z.length&&(b+="&s="+z);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(E.checked?"1":"0");
+b+="&resize="+(x.checked?"1":"0");b+="&x0="+Number(l.value);b+="&y0="+p;f.mathEnabled&&(b+="&math=1");u.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
a&&(b+="&title="+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(l.value),b+="&height="+a),g.value=b):g.value=""}var d=document.createElement("div"),f=a.editor.graph,h=f.getGraphBounds(),k=f.view.scale,m=Math.floor(h.x/k-f.view.translate.x),p=Math.floor(h.y/k-f.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";
d.appendChild(g);mxUtils.br(d);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.setAttribute("size","4");l.style.marginRight="16px";l.style.marginLeft="4px";l.value=m;d.appendChild(l);mxUtils.write(d,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type",
"text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(h.height/k);d.appendChild(n);mxUtils.br(d);h=document.createElement("hr");h.setAttribute("size","1");h.style.marginBottom="16px";h.style.marginTop="16px";d.appendChild(h);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=c||"";
-d.appendChild(q);mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";d.appendChild(t);mxUtils.br(d);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";d.appendChild(u);mxUtils.write(d,mxResources.get("pan")+" ");var w=document.createElement("input");
-w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";d.appendChild(w);mxUtils.write(d,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);d.appendChild(y);mxUtils.write(d,mxResources.get("edit")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";d.appendChild(v);mxUtils.write(d,
+d.appendChild(q);mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";d.appendChild(t);mxUtils.br(d);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";d.appendChild(v);mxUtils.write(d,mxResources.get("pan")+" ");var w=document.createElement("input");
+w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";d.appendChild(w);mxUtils.write(d,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);d.appendChild(y);mxUtils.write(d,mxResources.get("edit")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";d.appendChild(u);mxUtils.write(d,
mxResources.get("asNew")+" ");mxUtils.br(d);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("resize")+" ");var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginLeft="8px";d.appendChild(E);mxUtils.write(d,mxResources.get("fit")+" ");var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginLeft=
-"8px";d.appendChild(F);mxUtils.write(d,mxResources.get("embed")+" ");var z=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(u,"change",b);mxEvent.addListener(w,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(E,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(v,"change",b);mxEvent.addListener(F,"change",b);mxEvent.addListener(n,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(t,"change",b);mxEvent.addListener(q,"change",b);b();
+"8px";d.appendChild(F);mxUtils.write(d,mxResources.get("embed")+" ");var z=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(E,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(F,"change",b);mxEvent.addListener(n,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(t,"change",b);mxEvent.addListener(q,"change",b);b();
mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)});h=document.createElement("div");h.style.paddingTop="12px";h.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";h.appendChild(k);d.appendChild(h);this.container=d},CreateGraphDialog=function(a,c,b){var d=document.createElement("div");d.style.textAlign=
"right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);d.appendChild(c);var h=new Graph(c);h.setCellsCloneable(!0);h.setPanning(!0);h.setAllowDanglingEdges(!1);h.connectionHandler.select=!1;h.view.setTranslate(20,20);h.border=20;h.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";h.cellRenderer.installCellOverlayListeners=
function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))})};h.getAllConnectionConstraints=function(){return null};h.connectionHandler.marker.highlight.keepOnTop=
@@ -7518,8 +7539,8 @@ function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,
h.insertEdge(m,null,"",a,d,k)},function(){h.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),g=b.getProperty("state");h.popupMenuHandler.hideMenu();h.stopEditing(!1);var d=mxUtils.convertPoint(h.container,mxEvent.getClientX(c),mxEvent.getClientY(c));h.connectionHandler.start(g,d.x,d.y);h.isMouseDown=!0;h.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});h.addCellOverlay(a,b)});h.getModel().beginUpdate();var g;try{g=h.insertVertex(m,null,"Start",
0,0,80,30,"ellipse"),p(g)}finally{h.getModel().endUpdate()}var l;"horizontalTree"==b?(l=new mxCompactTreeLayout(h),l.edgeRouting=!1,l.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(l=new mxCompactTreeLayout(h,!1),l.edgeRouting=!1,l.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(l=new mxRadialTreeLayout(h,!1),l.edgeRouting=!1,l.levelDistance=80):"verticalFlow"==b?l=new mxHierarchicalLayout(h,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
b?l=new mxHierarchicalLayout(h,mxConstants.DIRECTION_WEST):"organic"==b?(l=new mxFastOrganicLayout(h,!1),l.forceConstant=80):"circle"==b&&(l=new mxCircleLayout(h));if(null!=l){var n=function(a,b){h.getModel().beginUpdate();try{null!=a&&a(),l.execute(h.getDefaultParent(),g)}catch(x){throw x;}finally{var c=new mxMorphing(h);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){h.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,c,g,d){q.apply(this,arguments);n()};h.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};h.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(h.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&d.appendChild(t);var u=mxUtils.button(mxResources.get("insert"),function(){h.clearCellOverlays();
-var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),b.x,b.y),g=a.editor.graph.view,d=g.getBounds(b);d.x-=g.translate.x;d.y-=g.translate.y;a.editor.graph.scrollRectToVisible(d);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(h.destroy(),c.parentNode.removeChild(c));a.hideDialog()});d.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(t)};this.container=d};
+function(a,b,c,g,d){q.apply(this,arguments);n()};h.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};h.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(h.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&d.appendChild(t);var v=mxUtils.button(mxResources.get("insert"),function(){h.clearCellOverlays();
+var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),b.x,b.y),g=a.editor.graph.view,d=g.getBounds(b);d.x-=g.translate.x;d.y-=g.translate.y;a.editor.graph.scrollRectToVisible(d);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(h.destroy(),c.parentNode.removeChild(c));a.hideDialog()});d.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(t)};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
IMAGE_PATH+"/handle-connect.png",26,26);
var BackgroundImageDialog=function(a,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=document.createElement("h2");mxUtils.write(d,mxResources.get("backgroundImage"));d.style.marginTop="0px";b.appendChild(d);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var d=a.editor.graph.backgroundImage,f=document.createElement("input");f.setAttribute("type","text");f.style.marginTop="4px";f.style.marginBottom="4px";f.style.width="350px";f.value=
@@ -7533,7 +7554,7 @@ l.className="geBtn";d.appendChild(l);null!=a.drive&&"1"==urlParams.photos&&(l=mx
a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),l.className="geBtn",d.appendChild(l))}l=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=f.value?new mxImage(mxUtils.trim(f.value),m.value,p.value):null)});l.className="geBtn gePrimaryBtn";d.appendChild(l);a.editor.cancelFirst||d.appendChild(g);b.appendChild(d);this.container=b},ParseDialog=function(a,c,b){function d(b,c){var g=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
c||"plantUmlTxt"==c){var g="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",d=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},n=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=l(c1&63);r+=l(c2&63);r+=l(c3&63);return r+=
l(c4&63)},f=new XMLHttpRequest;f.open("GET",g+function(a){r="";for(m=0;m<a.length;m+=3)r=m+2==a.length?r+n(a.charCodeAt(m),a.charCodeAt(m+1),0):m+1==a.length?r+n(a.charCodeAt(m),0,0):r+n(a.charCodeAt(m),a.charCodeAt(m+1),a.charCodeAt(m+2));return r}(d.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(f.responseType="blob");f.onload=function(g){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c)a.spinner.stop(),d.setSelectionCell(a.insertAsPreText(this.response,
-h.x,h.y)),d.scrollCellToVisible(d.getSelectionCell());else{var l=new FileReader;l.readAsDataURL(this.response);l.onloadend=function(c){var g=new Image;g.onload=function(){a.spinner.stop();var c=g.width,n=g.height;if(0==c&&0==n){var v=l.result,f=v.indexOf(","),v=decodeURIComponent(escape(atob(v.substring(f+1)))),v=mxUtils.parseXml(v).getElementsByTagName("svg");0<v.length&&(c=parseFloat(v[0].getAttribute("width")),n=parseFloat(v[0].getAttribute("height")))}d.getModel().beginUpdate();try{cell=d.insertVertex(null,
+h.x,h.y)),d.scrollCellToVisible(d.getSelectionCell());else{var l=new FileReader;l.readAsDataURL(this.response);l.onloadend=function(c){var g=new Image;g.onload=function(){a.spinner.stop();var c=g.width,n=g.height;if(0==c&&0==n){var u=l.result,f=u.indexOf(","),u=decodeURIComponent(escape(atob(u.substring(f+1)))),u=mxUtils.parseXml(u).getElementsByTagName("svg");0<u.length&&(c=parseFloat(u[0].getAttribute("width")),n=parseFloat(u[0].getAttribute("height")))}d.getModel().beginUpdate();try{cell=d.insertVertex(null,
null,b,h.x,h.y,c,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(l.result)+";")}finally{d.getModel().endUpdate()}d.setSelectionCell(cell);d.scrollCellToVisible(d.getSelectionCell())};g.src=l.result};l.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(g)};f.onerror=function(b){a.handleError(b)};f.send()}}else if("table"==c){for(var q=null,t=[],k=0,m=0;m<g.length;m++)if(f=mxUtils.trim(g[m]),"create table"==f.substring(0,12).toLowerCase())f=
mxUtils.trim(f.substring(12)),"("==f.charAt(f.length-1)&&(f=f.substring(0,f.lastIndexOf(" "))),q=new mxCell(f,new mxGeometry(k,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),q.vertex=!0,t.push(q),f=a.editor.graph.getPreferredSizeForCell(B),null!=f&&(q.geometry.width=f.width+10);else if(null!=q&&")"==f.charAt(0))k+=q.geometry.width+
40,q=null;else if("("!=f&&null!=q&&(f=f.substring(0,","==f.charAt(f.length-1)?f.length-1:f.length),"primary key"!=f.substring(0,11).toLowerCase())){var p=f.toLowerCase().indexOf("primary key"),f=f.replace(/primary key/i,""),B=new mxCell(f,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");B.vertex=
@@ -7550,30 +7571,30 @@ m.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setNa
p=document.createElement("option");p.setAttribute("value","diagram");mxUtils.write(p,mxResources.get("diagram"));"plantUml"!=b&&m.appendChild(p);p=document.createElement("option");p.setAttribute("value","plantUmlSvg");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&p.setAttribute("selected","selected");var g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
")");var l=document.createElement("option");l.setAttribute("value","plantUmlTxt");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(m.appendChild(p),m.appendChild(g),m.appendChild(l));var n=f();k.value=n;c.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();
a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(m);mxEvent.addListener(m,"change",function(){var a=f();if(0==k.value.length||k.value==n)n=a,k.value=n});b=mxUtils.button(mxResources.get("close"),function(){k.value==n?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);p=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();d(k.value,m.value)});c.appendChild(p);p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,f,h,k,m,p,g,l,n,q,t,u,w){function y(){var a=!0;if(null!=S)for(;H<S.length&&(a||0!=mxUtils.mod(H,30));)a=S[H++],E(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function v(){if(Z)b||a.hideDialog(),t(Z,aa,B.value);else if(d)b||a.hideDialog(),d(V,B.value);else{var c=B.value;
+function(){a.hideDialog();d(k.value,m.value)});c.appendChild(p);p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,d,f,h,k,m,p,g,l,n,q,t,v,w){function y(){var a=!0;if(null!=S)for(;H<S.length&&(a||0!=mxUtils.mod(H,30));)a=S[H++],E(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function u(){if(Z)b||a.hideDialog(),t(Z,aa,B.value);else if(d)b||a.hideDialog(),d(V,B.value);else{var c=B.value;
null!=c&&0<c.length&&a.pickFolder(a.mode,function(b){a.createFile(c,V,null!=R&&0<R.length?R:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function x(a,b,c,g,d){null!=Y&&(Y.style.backgroundColor="transparent",Y.style.border="1px solid transparent");C.removeAttribute("disabled");V=b;R=c;Y=a;Z=g;aa=d;Y.style.backgroundColor=m;Y.style.border=p}function E(b,c,g,d,l,n,f,h,q){var t=document.createElement("div");t.className="geTemplate";
-t.style.height=N+"px";t.style.width=X+"px";null!=d&&0<d.length&&t.setAttribute("title",d);if(null!=n)t.style.backgroundImage="url("+n+")",t.style.backgroundSize="contain",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",mxEvent.addListener(t,"click",function(a){x(t,null,null,b,f)}),mxEvent.addListener(t,"dblclick",function(a){v()});else if(null!=b&&0<b.length){g=q||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";t.style.backgroundImage="url("+g+")";t.style.backgroundPosition=
-"center center";t.style.backgroundRepeat="no-repeat";var E=!1;mxEvent.addListener(t,"click",function(g){C.setAttribute("disabled","disabled");t.style.backgroundColor="transparent";t.style.border="1px solid transparent";g=b;g=/^https?:\/\//.test(g)&&!a.isCorsEnabledForUrl(g)?PROXY_URL+"?url="+encodeURIComponent(g):TEMPLATE_PATH+"/"+g;J.spin(O);mxUtils.get(g,mxUtils.bind(this,function(a){J.stop();200<=a.getStatus()&&299>=a.getStatus()&&(x(t,a.getText(),c),E&&v())}))});mxEvent.addListener(t,"dblclick",
-function(a){E=!0})}else t.innerHTML='<table width="100%" height="100%" style="line-height:1em;"><tr><td align="center" valign="middle">'+mxResources.get(g)+"</td></tr></table>",l&&x(t),null!=h?mxEvent.addListener(t,"click",h):(mxEvent.addListener(t,"click",function(a){x(t)}),mxEvent.addListener(t,"dblclick",function(a){v()}));O.appendChild(t)}function F(){mxEvent.addListener(O,"scroll",function(a){O.scrollTop+O.clientHeight>=O.scrollHeight&&(y(),mxEvent.consume(a))});var a=null,b;for(b in P){var c=
+t.style.height=N+"px";t.style.width=X+"px";null!=d&&0<d.length&&t.setAttribute("title",d);if(null!=n)t.style.backgroundImage="url("+n+")",t.style.backgroundSize="contain",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",mxEvent.addListener(t,"click",function(a){x(t,null,null,b,f)}),mxEvent.addListener(t,"dblclick",function(a){u()});else if(null!=b&&0<b.length){g=q||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";t.style.backgroundImage="url("+g+")";t.style.backgroundPosition=
+"center center";t.style.backgroundRepeat="no-repeat";var E=!1;mxEvent.addListener(t,"click",function(g){C.setAttribute("disabled","disabled");t.style.backgroundColor="transparent";t.style.border="1px solid transparent";g=b;g=/^https?:\/\//.test(g)&&!a.isCorsEnabledForUrl(g)?PROXY_URL+"?url="+encodeURIComponent(g):TEMPLATE_PATH+"/"+g;J.spin(O);mxUtils.get(g,mxUtils.bind(this,function(a){J.stop();200<=a.getStatus()&&299>=a.getStatus()&&(x(t,a.getText(),c),E&&u())}))});mxEvent.addListener(t,"dblclick",
+function(a){E=!0})}else t.innerHTML='<table width="100%" height="100%" style="line-height:1em;"><tr><td align="center" valign="middle">'+mxResources.get(g)+"</td></tr></table>",l&&x(t),null!=h?mxEvent.addListener(t,"click",h):(mxEvent.addListener(t,"click",function(a){x(t)}),mxEvent.addListener(t,"dblclick",function(a){u()}));O.appendChild(t)}function F(){mxEvent.addListener(O,"scroll",function(a){O.scrollTop+O.clientHeight>=O.scrollHeight&&(y(),mxEvent.consume(a))});var a=null,b;for(b in P){var c=
document.createElement("div"),d=mxResources.get(b),l=P[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18<d.length&&(d=d.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",d+" ("+l.length+")");mxUtils.write(c,c.getAttribute("title"));null!=g&&(c.style.padding=g);Q.appendChild(c);null==a&&(a=c,a.style.backgroundColor=k);(function(b,g){mxEvent.addListener(c,
"click",function(){a!=g&&(a.style.backgroundColor="",a=g,a.style.backgroundColor=k,O.scrollTop=0,O.innerHTML="",H=0,S=P[b],I=null,y())})})(b,c)}y()}b=null!=b?b:!0;f=null!=f?f:!1;k=null!=k?k:"#ebf2f9";m=null!=m?m:"#e6eff8";p=null!=p?p:"1px solid #ccd9ea";l=null!=l?l:EditorUi.templateFile;var z=document.createElement("div");z.style.height="100%";var A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="46px";b&&z.appendChild(A);var G=document.createElement("img");G.setAttribute("border",
"0");G.setAttribute("align","absmiddle");G.style.width="40px";G.style.height="40px";G.style.marginRight="10px";G.style.paddingBottom="4px";G.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
!c&&b&&A.appendChild(G);b&&mxUtils.write(A,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");G=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?G=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?G=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?G=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?G=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(G=a.trello.extension);var B=
document.createElement("input");B.setAttribute("value",a.defaultFilename+G);B.style.marginRight="20px";B.style.marginLeft="10px";B.style.width=c?"220px":"430px";this.init=function(){b&&(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?B.select():document.execCommand("selectAll",!1,null))};b&&A.appendChild(B);var A=!1,H=0,J=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),C=mxUtils.button(w||
-mxResources.get("create"),function(){C.setAttribute("disabled","disabled");v();C.removeAttribute("disabled")});C.className="geBtn gePrimaryBtn";if(n||q){var D=[],I=null,M=function(a){C.setAttribute("disabled","disabled");for(var b=0;b<D.length;b++)D[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},A=!0;w=document.createElement("div");w.style.whiteSpace="nowrap";w.style.height="30px";z.appendChild(w);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";O.style.left=
+mxResources.get("create"),function(){C.setAttribute("disabled","disabled");u();C.removeAttribute("disabled")});C.className="geBtn gePrimaryBtn";if(n||q){var D=[],I=null,M=function(a){C.setAttribute("disabled","disabled");for(var b=0;b<D.length;b++)D[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},A=!0;w=document.createElement("div");w.style.whiteSpace="nowrap";w.style.height="30px";z.appendChild(w);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";O.style.left=
"160px";M(0);O.scrollTop=0;O.innerHTML="";H=0;I!=S&&(S=I,y(),I=null)});D.push(G);w.appendChild(G);var L=function(a){Q.style.display="none";O.style.left="30px";M(a?-1:1);null==I&&(I=S);O.scrollTop=0;O.innerHTML="";J.spin(O);H=0;var b=function(a,b){J.stop();S=a;b?O.innerHTML=b:0==a.length?O.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(O.innerHTML="",y())};a?q(T.value,b):n(b)};n&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),w.appendChild(G),D.push(G));
if(q){G=document.createElement("span");G.style.marginLeft="10px";G.innerHTML=mxResources.get("search")+":";w.appendChild(G);var T=document.createElement("input");T.style.marginRight="10px";T.style.marginLeft="10px";T.style.width="220px";mxEvent.addListener(T,"keypress",function(a){13==a.keyCode&&L(!0)});w.appendChild(T);G=mxUtils.button(mxResources.get("search"),function(){L(!0)});G.className="geBtn";w.appendChild(G)}M(0)}var R=null,V=null,Y=null,Z=null,aa=null,O=document.createElement("div");O.style.border=
"1px solid #d3d3d3";O.style.position="absolute";O.style.left="160px";O.style.right="34px";A=(b?72:40)+(A?30:0);O.style.top=A+"px";O.style.bottom="68px";O.style.margin="6px 0 0 -1px";O.style.padding="6px";O.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var N=140,X=140,P={},U=1;P.basic=[{title:"blankDiagram",select:!0}];var S=P.basic;if(!c){z.appendChild(Q);
z.appendChild(O);var ba=!1;/^https?:\/\//.test(l)&&!a.isCorsEnabledForUrl(l)&&(l=PROXY_URL+"?url="+encodeURIComponent(l));mxUtils.get(l,function(a){if(!ba){ba=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=a.getAttribute("section");null==c&&(c=b.indexOf("/"),c=b.substring(0,c));b=P[c];null==b&&(U++,b=[],P[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
-tooltip:a.getAttribute("url"),preview:a.getAttribute("preview")})}}a=a.nextSibling}F()}})}mxEvent.addListener(B,"keypress",function(b){a.dialog.container.firstChild==z&&13==b.keyCode&&v()});l=document.createElement("div");l.style.marginTop=c?"4px":"16px";l.style.textAlign="right";l.style.position="absolute";l.style.left="40px";l.style.bottom="24px";l.style.right="40px";A=mxUtils.button(mxResources.get("cancel"),function(){null!=h&&h();a.hideDialog(!0)});A.className="geBtn";!a.editor.cancelFirst||
+tooltip:a.getAttribute("url"),preview:a.getAttribute("preview")})}}a=a.nextSibling}F()}})}mxEvent.addListener(B,"keypress",function(b){a.dialog.container.firstChild==z&&13==b.keyCode&&u()});l=document.createElement("div");l.style.marginTop=c?"4px":"16px";l.style.textAlign="right";l.style.position="absolute";l.style.left="40px";l.style.bottom="24px";l.style.right="40px";A=mxUtils.button(mxResources.get("cancel"),function(){null!=h&&h();a.hideDialog(!0)});A.className="geBtn";!a.editor.cancelFirst||
f&&null==h||l.appendChild(A);c||a.isOffline()||!b||null!=d||f||(w=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),w.className="geBtn",l.appendChild(w));c||"1"==urlParams.embed||f||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(B.value)+
-"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",l.appendChild(c));Graph.fileSupport&&u&&(u=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0)});b.click()}),u.className="geBtn",
-l.appendChild(u));l.appendChild(C);a.editor.cancelFirst||null!=d||f&&null==h||l.appendChild(A);z.appendChild(l);this.container=z},CreateDialog=function(a,c,b,d,f,h,k,m,p,g,l,n,q,t,u){function w(b,g,d,l){function v(){mxEvent.addListener(f,"click",function(){var b=d;if(k){var g=x.value,l=g.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:z.value,n="";b==App.MODE_GOOGLE?n=a.drive.extension:b==App.MODE_GITHUB?n=a.gitHub.extension:b==App.MODE_TRELLO?n=a.trello.extension:b==App.MODE_DROPBOX?
+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",l.appendChild(c));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0)});b.click()}),v.className="geBtn",
+l.appendChild(v));l.appendChild(C);a.editor.cancelFirst||null!=d||f&&null==h||l.appendChild(A);z.appendChild(l);this.container=z},CreateDialog=function(a,c,b,d,f,h,k,m,p,g,l,n,q,t,v){function w(b,g,d,l){function u(){mxEvent.addListener(f,"click",function(){var b=d;if(k){var g=x.value,l=g.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:z.value,n="";b==App.MODE_GOOGLE?n=a.drive.extension:b==App.MODE_GITHUB?n=a.gitHub.extension:b==App.MODE_TRELLO?n=a.trello.extension:b==App.MODE_DROPBOX?
n=a.dropbox.extension:b==App.MODE_ONEDRIVE?n=a.oneDrive.extension:b==App.MODE_DEVICE&&(n=".xml");0<=l&&(g=g.substring(0,l));x.value=g+n}}y(d)})}var f=document.createElement("a");f.style.overflow="hidden";var h=document.createElement("img");h.src=b;h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="60px";h.style.height="60px";h.style.paddingBottom="6px";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin=
-"4px";f.style.padding="8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(h);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var q=document.createElement("div");f.appendChild(q);mxUtils.write(q,g);if(null!=l&&null==a[l]){h.style.visibility="hidden";mxUtils.setOpacity(q,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(f);var u=window.setTimeout(function(){null==
-a[l]&&(t.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(u),mxUtils.setOpacity(q,100),h.style.visibility="",t.stop(),v())}))}else v();E.appendChild(f);++F==n&&(mxUtils.br(E),F=0)}function y(c){var g=x.value;if(null==c||null!=g&&0<g.length)a.hideDialog(),b(g,c)}k=null!=k?k:!0;m=null!=m?m:!0;n=null!=n?n:4;h=document.createElement("div");null==d&&a.addLanguageMenu(h);var v=document.createElement("h2");mxUtils.write(v,f||
-mxResources.get("create"));v.style.marginTop="0px";v.style.marginBottom="24px";h.appendChild(v);mxUtils.write(h,mxResources.get("filename")+":");var x=document.createElement("input");x.setAttribute("value",c);x.style.width="280px";x.style.marginLeft="10px";x.style.marginBottom="20px";this.init=function(){x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};h.appendChild(x);null!=q&&null!=t&&"image/"==t.substring(0,
-6)&&(x.style.width="160px",f=null,"image/svg+xml"==t&&mxClient.IS_SVG?(f=document.createElement("div"),f.innerHTML=mxUtils.trim(q),q=f.getElementsByTagName("svg")[0],t=parseInt(q.getAttribute("width")),u=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+t+" "+u),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(f=document.createElement("img"),f.setAttribute("src","data:"+t+(u?";base64,":";utf8,")+q)),f.style.position="absolute",f.style.top="70px",f.style.right="100px",
+"4px";f.style.padding="8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(h);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var q=document.createElement("div");f.appendChild(q);mxUtils.write(q,g);if(null!=l&&null==a[l]){h.style.visibility="hidden";mxUtils.setOpacity(q,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(f);var v=window.setTimeout(function(){null==
+a[l]&&(t.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(v),mxUtils.setOpacity(q,100),h.style.visibility="",t.stop(),u())}))}else u();E.appendChild(f);++F==n&&(mxUtils.br(E),F=0)}function y(c){var g=x.value;if(null==c||null!=g&&0<g.length)a.hideDialog(),b(g,c)}k=null!=k?k:!0;m=null!=m?m:!0;n=null!=n?n:4;h=document.createElement("div");null==d&&a.addLanguageMenu(h);var u=document.createElement("h2");mxUtils.write(u,f||
+mxResources.get("create"));u.style.marginTop="0px";u.style.marginBottom="24px";h.appendChild(u);mxUtils.write(h,mxResources.get("filename")+":");var x=document.createElement("input");x.setAttribute("value",c);x.style.width="280px";x.style.marginLeft="10px";x.style.marginBottom="20px";this.init=function(){x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};h.appendChild(x);null!=q&&null!=t&&"image/"==t.substring(0,
+6)&&(x.style.width="160px",f=null,"image/svg+xml"==t&&mxClient.IS_SVG?(f=document.createElement("div"),f.innerHTML=mxUtils.trim(q),q=f.getElementsByTagName("svg")[0],t=parseInt(q.getAttribute("width")),v=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+t+" "+v),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(f=document.createElement("img"),f.setAttribute("src","data:"+t+(v?";base64,":";utf8,")+q)),f.style.position="absolute",f.style.top="70px",f.style.right="100px",
f.style.maxWidth="120px",f.style.maxHeight="80px",mxUtils.setPrefixedStyle(f.style,"transform","translate(50%,-50%)"),h.appendChild(f),p&&Editor.popupsAllowed&&(f.style.cursor="pointer",mxEvent.addListener(f,"click",function(){y("_blank")})));mxUtils.br(h);var E=document.createElement("div");E.style.textAlign="center";var F=0;E.style.marginTop="6px";h.appendChild(E);var z=document.createElement("select");z.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&
(q=document.createElement("option"),q.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),z.appendChild(q),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),z.appendChild(q),a.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",
mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),z.appendChild(q),a.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),
@@ -7585,7 +7606,7 @@ mxUtils.write(h,mxResources.get("fileOpenLocation"));mxUtils.br(h);mxUtils.br(h)
mxUtils.write(h,mxResources.get("allowPopups"));this.container=h},ImageDialog=function(a,c,b,d,f,h){h=null!=h?h:!0;var k=a.editor.graph,m=document.createElement("div");mxUtils.write(m,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("value",
b);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",
mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display=mxClient.IS_VML?"inline":"inline-block";b.style.top=(mxClient.IS_VML?0:3)+"px";b.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(b,"click",function(){p.value="";p.focus()});c.appendChild(p);c.appendChild(b);m.appendChild(c);var g=function(b,c,g,l){var n="data:"==b.substring(0,5);!a.isOffline()||n&&"undefined"===typeof chrome?
-0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(n){a.spinner.stop();a.hideDialog();var v=!1===l?1:null!=c&&null!=g?Math.max(c/n.width,g/n.height):Math.min(1,Math.min(520/n.width,520/n.height));h&&(b=a.convertDataUri(b));d(b,Math.round(Number(n.width)*v),Math.round(Number(n.height)*v))},function(){a.spinner.stop();d(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),d(b)):(b=a.convertDataUri(b),
+0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(n){a.spinner.stop();a.hideDialog();var u=!1===l?1:null!=c&&null!=g?Math.max(c/n.width,g/n.height):Math.min(1,Math.min(520/n.width,520/n.height));h&&(b=a.convertDataUri(b));d(b,Math.round(Number(n.width)*u),Math.round(Number(n.height)*u))},function(){a.spinner.stop();d(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),d(b)):(b=a.convertDataUri(b),
c=null==c?120:c,g=null==g?100:g,a.hideDialog(),d(b,c,g))},l=function(b,c){if(null!=b){var l=f?null:k.getModel().getGeometry(k.getSelectionCell());null!=l?g(b,l.width,l.height,c):g(b,null,null,c)}else a.hideDialog(),d(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=m.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,
"dragover",mxUtils.bind(this,function(g){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,g,d,n,f,h){l(a,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));
else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var g=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(g)&&l(decodeURIComponent(g))}b.stopPropagation();b.preventDefault()}),!1)}};b=document.createElement("div");b.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";b.style.textAlign="right";c=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);ImageDialog.filePicked=
@@ -7599,8 +7620,8 @@ c.appendChild(b);y.appendChild(c)}var k=document.createElement("div");mxUtils.wr
p.style.marginTop="6px";p.style.width="440px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";var g=document.createElement("div");g.setAttribute("title",mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";g.style.display=mxClient.IS_VML?"inline":"inline-block";g.style.top=(mxClient.IS_VML?
0:3)+"px";g.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){p.value="";p.focus()});var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name",
"current-linkdialog");var q=document.createElement("select");q.style.width="420px";if(f&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(p.setAttribute("value",c),l.setAttribute("checked","checked"),l.defaultChecked=!0);p.style.width="420px";m.appendChild(l);m.appendChild(p);m.appendChild(g);mxUtils.br(m);m.appendChild(n);f=!1;for(g=0;g<a.pages.length;g++){var t=document.createElement("option");mxUtils.write(t,a.pages[g].getName()||
-mxResources.get("pageWithNumber",[g+1]));t.setAttribute("value","data:page/id,"+a.pages[g].getId());c==t.getAttribute("value")&&(t.setAttribute("selected","selected"),f=!0);q.appendChild(t)}if(!f&&n.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");q.appendChild(u);mxEvent.addListener(q,"change",function(){null==u.parentNode||u.selected||
-u.parentNode.removeChild(u)})}m.appendChild(q)}else p.setAttribute("value",c),m.appendChild(p),m.appendChild(g);k.appendChild(m);var w=mxUtils.button(b,function(){a.hideDialog();d(n.checked?"pageNotFound"!==q.value?q.value:c:p.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){n.checked?q.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null));
+mxResources.get("pageWithNumber",[g+1]));t.setAttribute("value","data:page/id,"+a.pages[g].getId());c==t.getAttribute("value")&&(t.setAttribute("selected","selected"),f=!0);q.appendChild(t)}if(!f&&n.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");q.appendChild(v);mxEvent.addListener(q,"change",function(){null==v.parentNode||v.selected||
+v.parentNode.removeChild(v)})}m.appendChild(q)}else p.setAttribute("value",c),m.appendChild(p),m.appendChild(g);k.appendChild(m);var w=mxUtils.button(b,function(){a.hideDialog();d(n.checked?"pageNotFound"!==q.value?q.value:c:p.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){n.checked?q.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null));
mxEvent.addListener(q,"focus",function(){l.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(p,"focus",function(){n.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(g){null==c&&(!mxClient.IS_IE||
10<document.documentMode)&&(c=a.highlightElement(b));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),l.setAttribute("checked","checked"),l.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign=
"right";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&y.appendChild(b);m=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});m.style.verticalAlign="middle";m.className="geBtn";y.appendChild(m);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=
@@ -7619,37 +7640,37 @@ mxEvent.addListener(d,"change",function(){0<d.value.length&&0<h.test(d.value)?f.
c.appendChild(p);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(b.appendChild(m),b.appendChild(f)):(b.appendChild(f),b.appendChild(m));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,c,b){var d=document.createElement("div"),f=document.createElement("h3");f.style.marginTop="0px";mxUtils.write(f,mxResources.get("revisionHistory"));d.appendChild(f);var h=document.createElement("div");h.style.position="absolute";h.style.overflow="auto";h.style.width="170px";h.style.height="378px";d.appendChild(h);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height=
"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);d.appendChild(k);var m=new Graph(k);m.setTooltips(!1);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var p=0,g=null,l=0,n=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=g&&null!=g[l]?g[l].getAttribute("name"):"pagenumber"==a?l+1:n.apply(this,arguments)};m.getLinkForCell=function(){return null};
-Editor.MathJaxRender&&m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),t=a.getCurrentFile(),u=null,w=null,y=null,v=null,x=mxUtils.button("",function(){null!=y&&m.zoomIn()});x.className="geSprite geSprite-zoomin";x.setAttribute("title",
+Editor.MathJaxRender&&m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),t=a.getCurrentFile(),v=null,w=null,y=null,u=null,x=mxUtils.button("",function(){null!=y&&m.zoomIn()});x.className="geSprite geSprite-zoomin";x.setAttribute("title",
mxResources.get("zoomIn"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var E=mxUtils.button("",function(){null!=y&&m.zoomOut()});E.className="geSprite geSprite-zoomout";E.setAttribute("title",mxResources.get("zoomOut"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var F=mxUtils.button("",function(){null!=y&&(m.maxFitScale=8,m.fit(8),
m.center())});F.className="geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var z=mxUtils.button("",function(){null!=y&&(m.zoomActual(),m.center())});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");
mxUtils.setOpacity(z,20);var A=document.createElement("div");A.style.position="absolute";A.style.textAlign="right";A.style.color="gray";A.style.marginTop="10px";A.style.backgroundColor="transparent";A.style.top="440px";A.style.right="32px";A.style.maxWidth="380px";A.style.cursor="default";var G=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(y.documentElement);a.isLocalFileSave()?
-a.saveLocalFile(c,b,"text/xml"):(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});G.className="geBtn";G.setAttribute("disabled","disabled");var B=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=v&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(v):a.spinner.spin(document.body,mxResources.get("restoring"))&&
-t.save(!0,function(b){a.spinner.stop();a.replaceFileData(v);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});B.className="geBtn";B.setAttribute("disabled","disabled");var H=document.createElement("select");H.setAttribute("disabled","disabled");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";H.style.display="none";var J=null;mxEvent.addListener(H,
+a.saveLocalFile(c,b,"text/xml"):(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});G.className="geBtn";G.setAttribute("disabled","disabled");var B=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=u&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(u):a.spinner.spin(document.body,mxResources.get("restoring"))&&
+t.save(!0,function(b){a.spinner.stop();a.replaceFileData(u);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});B.className="geBtn";B.setAttribute("disabled","disabled");var H=document.createElement("select");H.setAttribute("disabled","disabled");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";H.style.display="none";var J=null;mxEvent.addListener(H,
"change",function(a){null!=J&&(J(a),mxEvent.consume(a))});var C=mxUtils.button(mxResources.get("open"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),a.openLink(a.getUrl(),null,!0))});C.className="geBtn";C.setAttribute("disabled","disabled");null!=b&&(C.style.display="none");var D=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl(H.selectedIndex))});D.className="geBtn gePrimaryBtn";
D.setAttribute("disabled","disabled");null!=b&&(D.style.display="none",B.className="geBtn gePrimaryBtn");f=document.createElement("div");f.style.position="absolute";f.style.top="482px";f.style.width="640px";f.style.textAlign="right";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.padding="2px";I.style.border="none";I.style.left="199px";I.style.top="442px";var M=null;if(null!=c&&0<c.length){k.style.cursor="move";var L=document.createElement("table");
-L.style.border="1px solid lightGray";L.style.borderCollapse="collapse";L.style.borderSpacing="0px";L.style.width="100%";var T=document.createElement("tbody"),R=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(p=mxUtils.indexOf(a.pages,a.currentPage));for(var V=c.length-1;0<=V;V--){var Y=function(b){var d=new Date(b.modifiedDate),n=null;if(0<=d.getTime()){var f=function(c){q.stop();var f=mxUtils.parseXml(c),h=a.editor.extractGraphModel(f.documentElement,!0);if(null!=h){var u=function(b){null!=
-b&&(b=w(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},w=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};H.style.display="none";H.innerHTML="";y=f;v=c;g=parseSelectFunction=null;l=0;if("mxfile"==h.nodeName){f=h.getElementsByTagName("diagram");g=[];for(c=0;c<f.length;c++)g.push(f[c]);
-l=Math.min(p,g.length-1);0<g.length&&u(g[l]);if(1<g.length)for(H.removeAttribute("disabled"),H.style.display="",c=0;c<g.length;c++)f=document.createElement("option"),mxUtils.write(f,g[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),f.setAttribute("value",c),c==l&&f.setAttribute("selected","selected"),H.appendChild(f);J=function(){l=p=parseInt(H.value);u(g[p])}}else w(h);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");A.innerHTML="";mxUtils.write(A,(null!=
+L.style.border="1px solid lightGray";L.style.borderCollapse="collapse";L.style.borderSpacing="0px";L.style.width="100%";var T=document.createElement("tbody"),R=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(p=mxUtils.indexOf(a.pages,a.currentPage));for(var V=c.length-1;0<=V;V--){var Y=function(b){var d=new Date(b.modifiedDate),n=null;if(0<=d.getTime()){var f=function(c){q.stop();var f=mxUtils.parseXml(c),h=a.editor.extractGraphModel(f.documentElement,!0);if(null!=h){var v=function(b){null!=
+b&&(b=w(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},w=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return a};H.style.display="none";H.innerHTML="";y=f;u=c;g=parseSelectFunction=null;l=0;if("mxfile"==h.nodeName){f=h.getElementsByTagName("diagram");g=[];for(c=0;c<f.length;c++)g.push(f[c]);
+l=Math.min(p,g.length-1);0<g.length&&v(g[l]);if(1<g.length)for(H.removeAttribute("disabled"),H.style.display="",c=0;c<g.length;c++)f=document.createElement("option"),mxUtils.write(f,g[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),f.setAttribute("value",c),c==l&&f.setAttribute("selected","selected"),H.appendChild(f);J=function(){l=p=parseInt(H.value);v(g[p])}}else w(h);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");A.innerHTML="";mxUtils.write(A,(null!=
c?c+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());A.setAttribute("title",n.getAttribute("title"));x.removeAttribute("disabled");E.removeAttribute("disabled");F.removeAttribute("disabled");z.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&B.removeAttribute("disabled"),G.removeAttribute("disabled"),D.removeAttribute("disabled"),C.removeAttribute("disabled"));mxUtils.setOpacity(x,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(z,
60)}else H.style.display="none",H.innerHTML="",A.innerHTML="",mxUtils.write(A,mxResources.get("errorLoadingFile"))},n=document.createElement("tr");n.style.borderBottom="1px solid lightGray";n.style.fontSize="12px";n.style.cursor="pointer";var h=document.createElement("td");h.style.padding="6px";h.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(h,mxResources.get("current")):d.toDateString()===R?mxUtils.write(h,d.toLocaleTimeString()):mxUtils.write(h,d.toLocaleDateString()+" "+d.toLocaleTimeString());
-n.appendChild(h);n.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(n,"click",function(a){w!=b&&(q.stop(),null!=u&&(u.style.backgroundColor=""),w=b,u=n,u.style.backgroundColor="#ebf2f9",v=y=null,A.removeAttribute("title"),A.innerHTML=mxResources.get("loading")+"...",k.style.backgroundColor="#ffffff",m.getModel().clear(),B.setAttribute("disabled","disabled"),
+n.appendChild(h);n.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(n,"click",function(a){w!=b&&(q.stop(),null!=v&&(v.style.backgroundColor=""),w=b,v=n,v.style.backgroundColor="#ebf2f9",u=y=null,A.removeAttribute("title"),A.innerHTML=mxResources.get("loading")+"...",k.style.backgroundColor="#ffffff",m.getModel().clear(),B.setAttribute("disabled","disabled"),
G.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(x,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(z,20),q.spin(k),b.getXml(function(a){w==b&&f(a)},function(a){q.stop();H.style.display="none";H.innerHTML=
"";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(n,"dblclick",function(a){D.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(n)}return n}(c[V]);null!=Y&&V==c.length-1&&(M=Y)}L.appendChild(T);h.appendChild(L)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(k.style.display=
"none",I.style.display="none",mxUtils.write(h,mxResources.get("notAvailable"))):(k.style.display="none",I.style.display="none",mxUtils.write(h,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.className="geBtn";I.appendChild(H);I.appendChild(x);I.appendChild(E);I.appendChild(z);I.appendChild(F);a.editor.cancelFirst?(f.appendChild(h),f.appendChild(G),f.appendChild(C),f.appendChild(B),f.appendChild(D)):(f.appendChild(G),
f.appendChild(C),f.appendChild(B),f.appendChild(D),f.appendChild(h));d.appendChild(f);d.appendChild(I);d.appendChild(A);this.container=d},DraftDialog=function(a,c,b,d,f,h,k,m){var p=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";mxUtils.write(g,c);p.appendChild(g);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.marginTop="10px";l.style.width="640px";
-l.style.top="46px";l.style.bottom="74px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);p.appendChild(l);var n=new Graph(l);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;c=mxUtils.parseXml(b);var q=a.editor.extractGraphModel(c.documentElement,!0),t=0,u=null,w=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[t]?u[t].getAttribute("name"):
+l.style.top="46px";l.style.bottom="74px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);p.appendChild(l);var n=new Graph(l);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;c=mxUtils.parseXml(b);var q=a.editor.extractGraphModel(c.documentElement,!0),t=0,v=null,w=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=v&&null!=v[t]?v[t].getAttribute("name"):
"pagenumber"==a?t+1:w.apply(this,arguments)};n.getLinkForCell=function(){return null};c=mxUtils.button("",function(){n.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);b=mxUtils.button("",function(){n.zoomOut()});b.className="geSprite geSprite-zoomout";b.setAttribute("title",mxResources.get("zoomOut"));b.style.outline="none";b.style.border="none";b.style.margin=
"2px";mxUtils.setOpacity(b,60);g=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});g.className="geSprite geSprite-fit";g.setAttribute("title",mxResources.get("fit"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);var y=mxUtils.button("",function(){n.zoomActual();n.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";mxUtils.setOpacity(y,
-60);f=mxUtils.button(k||mxResources.get("discard"),f);f.className="geBtn";var v=document.createElement("select");v.style.maxWidth="80px";v.style.position="relative";v.style.top="-2px";v.style.verticalAlign="bottom";v.style.marginRight="6px";v.style.display="none";d=mxUtils.button(h||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";h=document.createElement("div");h.style.position="absolute";h.style.bottom="30px";h.style.width="640px";h.style.textAlign="right";k=document.createElement("div");
+60);f=mxUtils.button(k||mxResources.get("discard"),f);f.className="geBtn";var u=document.createElement("select");u.style.maxWidth="80px";u.style.position="relative";u.style.top="-2px";u.style.verticalAlign="bottom";u.style.marginRight="6px";u.style.display="none";d=mxUtils.button(h||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";h=document.createElement("div");h.style.position="absolute";h.style.bottom="30px";h.style.width="640px";h.style.textAlign="right";k=document.createElement("div");
k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));
-return c}mxEvent.addListener(v,"change",function(a){t=parseInt(v.value);c(u[t]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var g=q.getElementsByTagName("diagram");u=[];for(var d=0;d<g.length;d++)u.push(g[d]);0<u.length&&c(u[t]);if(1<u.length)for(v.style.display="",d=0;d<u.length;d++)g=document.createElement("option"),mxUtils.write(g,u[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),g.setAttribute("value",d),d==t&&g.setAttribute("selected","selected"),v.appendChild(g)}else b(q)};
-k.appendChild(v);k.appendChild(c);k.appendChild(b);k.appendChild(y);k.appendChild(g);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(h.appendChild(c),null!=m&&h.appendChild(m),h.appendChild(f),h.appendChild(d)):(h.appendChild(d),h.appendChild(f),null!=m&&h.appendChild(m),h.appendChild(c));p.appendChild(h);p.appendChild(k);this.container=p},FindWindow=
+return c}mxEvent.addListener(u,"change",function(a){t=parseInt(u.value);c(v[t]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var g=q.getElementsByTagName("diagram");v=[];for(var d=0;d<g.length;d++)v.push(g[d]);0<v.length&&c(v[t]);if(1<v.length)for(u.style.display="",d=0;d<v.length;d++)g=document.createElement("option"),mxUtils.write(g,v[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),g.setAttribute("value",d),d==t&&g.setAttribute("selected","selected"),u.appendChild(g)}else b(q)};
+k.appendChild(u);k.appendChild(c);k.appendChild(b);k.appendChild(y);k.appendChild(g);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(h.appendChild(c),null!=m&&h.appendChild(m),h.appendChild(f),h.appendChild(d)):(h.appendChild(d),h.appendChild(f),null!=m&&h.appendChild(m),h.appendChild(c));p.appendChild(h);p.appendChild(k);this.container=p},FindWindow=
function(a,c,b,d,f){function h(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var g=0;g<b.length;g++)if("label"!=b[g].nodeName){var d=mxUtils.trim(b[g].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,c.length)===c||null!=a&&a.test(d))return!0}}return!1}function k(){var a=p.model.getDescendants(p.model.getRoot()),b=q.value.toLowerCase(),c=t.checked?new RegExp(b):null,d=null;g!=b&&(g=b,l=null);var n=null==l;if(0<b.length)for(var f=
0;f<a.length;f++){var k=p.view.getState(a[f]);if(null!=k&&null!=k.cell.value&&(n||null==d)&&(p.model.isVertex(k.cell)||p.model.isEdge(k.cell))&&(p.isHtmlLabel(k.cell)?(w.innerHTML=p.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([w])):label=p.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||h(c,k.cell,b))||null!=c&&(c.test(label)||h(c,k.cell,b))))if(n){d=k;break}else null==d&&(d=k);n=n||k==l}null!=
d?(l=d,p.scrollCellToVisible(l.cell),p.isEnabled()?p.setSelectionCell(l.cell):p.highlightCell(l.cell)):p.isEnabled()&&p.clearSelection();return 0==b.length||null!=d}var m=a.actions.get("find"),p=a.editor.graph,g=null,l=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom=
-"6px";q.style.width="200px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";n.appendChild(q);mxUtils.br(n);var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";n.appendChild(t);mxUtils.write(n,mxResources.get("regularExpression"));var u=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");u.style.position="relative";u.style.marginLeft="6px";u.style.top="-1px";n.appendChild(u);var w=document.createElement("div");
-mxUtils.br(n);u=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";g=l=null;q.focus()});u.setAttribute("title",mxResources.get("reset"));u.style.marginTop="6px";u.style.marginRight="4px";u.className="geBtn";n.appendChild(u);u=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(y){a.handleError(y)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");u.style.marginTop="6px";u.className="geBtn gePrimaryBtn";
-n.appendChild(u);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(g!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(v){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(m.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,c,b,d,f,!0,!0);this.window.destroyOnClose=
+"6px";q.style.width="200px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";n.appendChild(q);mxUtils.br(n);var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";n.appendChild(t);mxUtils.write(n,mxResources.get("regularExpression"));var v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";n.appendChild(v);var w=document.createElement("div");
+mxUtils.br(n);v=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";g=l=null;q.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";n.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(y){a.handleError(y)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";
+n.appendChild(v);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(g!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(u){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(m.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,c,b,d,f,!0,!0);this.window.destroyOnClose=
!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):p.container.focus()}))},TagsWindow=function(a,c,b,d,f){var h=a.editor.graph,k="tags",m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding=
"10px";m.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("allTags"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.width="260px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";m.appendChild(p);if(!a.isOffline()||mxClient.IS_CHROMEAPP){p.style.width="240px";var g=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");g.firstChild.style.marginBottom="6px";g.style.marginLeft=
"6px";m.appendChild(g)}mxEvent.addListener(p,"dblclick",function(){var b=new FilenameDialog(a,k,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(k=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});p.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(m);g=mxUtils.button(mxResources.get("hide"),function(){var a=h.getCellsForTags(p.value.split(" "),void 0,k);h.setCellsVisible(a,!1)});g.setAttribute("title",
@@ -7661,14 +7682,14 @@ m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginR
" "+mxResources.get("rememberMe")),b.appendChild(h),f.appendChild(b),p.checked=!0,p.defaultChecked=!0,mxEvent.addListener(h,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)}));this.container=f},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var d=document.createElement("div"),f=[];if(null!=a.sidebar.customEntries)for(var h=0;h<a.sidebar.customEntries.length;h++){for(var k=a.sidebar.customEntries[h],m={title:a.getResource(k.title),entries:[]},p=0;p<k.entries.length;p++){var g=
k.entries[p];m.entries.push({id:g.id,title:a.getResource(g.title),desc:a.getResource(g.desc),image:g.preview})}f.push(m)}for(h=0;h<b.length;h++)if(null==a.sidebar.enabledLibraries)f.push(b[h]);else{m={title:b[h].title,entries:[]};for(p=0;p<b[h].entries.length;p++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[h].entries[p].id)&&m.entries.push(b[h].entries[p]);0<m.entries.length&&f.push(m)}b=f;if(c){p=document.createElement("div");p.className="geDialogTitle";mxUtils.write(p,mxResources.get("shapes"));
p.style.position="absolute";p.style.top="0px";p.style.left="0px";p.style.lineHeight="40px";p.style.height="40px";p.style.right="0px";mxClient.IS_QUIRKS&&(p.style.width="718px");var l=document.createElement("div"),n=document.createElement("div");l.style.position="absolute";l.style.top="40px";l.style.left="0px";l.style.width="202px";l.style.bottom="60px";l.style.overflow="auto";mxClient.IS_QUIRKS&&(l.style.height="437px",l.style.marginTop="1px");n.style.position="absolute";n.style.left="202px";n.style.right=
-"0px";n.style.top="40px";n.style.bottom="60px";n.style.overflow="auto";n.style.borderLeft="1px solid rgb(211, 211, 211)";n.style.textAlign="center";mxClient.IS_QUIRKS&&(n.style.width=parseInt(p.style.width)-202+"px",n.style.height=l.style.height,n.style.marginTop=l.style.marginTop);var q=null,t=[],u=document.createElement("div");u.style.position="relative";u.style.left="0px";u.style.right="0px";for(h=0;h<b.length;h++)(function(b){var c=u.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=
-"dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);l.appendChild(c);for(var g=0;g<b.entries.length;g++)(function(b){var c=u.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var d=document.createElement("input");d.setAttribute("type","checkbox");d.checked=a.sidebar.isEntryVisible(b.id);d.defaultChecked=d.checked;c.appendChild(d);mxUtils.write(c," "+b.title);l.appendChild(c);var f=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){n.style.textAlign=
+"0px";n.style.top="40px";n.style.bottom="60px";n.style.overflow="auto";n.style.borderLeft="1px solid rgb(211, 211, 211)";n.style.textAlign="center";mxClient.IS_QUIRKS&&(n.style.width=parseInt(p.style.width)-202+"px",n.style.height=l.style.height,n.style.marginTop=l.style.marginTop);var q=null,t=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";for(h=0;h<b.length;h++)(function(b){var c=v.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=
+"dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);l.appendChild(c);for(var g=0;g<b.entries.length;g++)(function(b){var c=v.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var d=document.createElement("input");d.setAttribute("type","checkbox");d.checked=a.sidebar.isEntryVisible(b.id);d.defaultChecked=d.checked;c.appendChild(d);mxUtils.write(c," "+b.title);l.appendChild(c);var f=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){n.style.textAlign=
"center";n.style.padding="0px";n.style.color="";n.innerHTML="";if(null!=b.desc){var g=document.createElement("pre");g.style.boxSizing="border-box";g.style.fontFamily="inherit";g.style.margin="20px";g.style.right="0px";g.style.textAlign="left";mxUtils.write(g,b.desc);n.appendChild(g)}null!=b.imageCallback?b.imageCallback(n):null!=b.image?n.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(n.style.padding="20px",n.style.color="rgb(179, 179, 179)",mxUtils.write(n,mxResources.get("noPreview")));
null!=q&&(q.style.backgroundColor="");q=c;q.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",f);mxEvent.addListener(c,"dblclick",function(a){d.checked=!d.checked;mxEvent.consume(a)});t.push(function(){return d.checked?b.id:null});0==h&&0==g&&f()})(b.entries[g])})(b[h]);d.style.padding="30px";d.appendChild(p);d.appendChild(l);d.appendChild(n);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";
b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=p.style.width,b.style.paddingTop="12px");var w=document.createElement("input");w.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)p=document.createElement("span"),p.style.paddingRight="20px",p.appendChild(w),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),w.checked=!0,w.defaultChecked=
!0,mxEvent.addListener(p,"click",function(a){mxEvent.getSource(a)!=w&&(w.checked=!w.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(p.style.position="relative",p.style.top="-6px"),b.appendChild(p);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<t.length;c++){var g=t[c].apply(this,arguments);null!=g&&b.push(g)}a.sidebar.showEntries(b.join(";"),w.checked,!0)});c.className=
-"geBtn gePrimaryBtn"}else{var y=document.createElement("table"),p=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";m=document.createElement("tr");y.style.width="100%";c=document.createElement("td");var f=document.createElement("td"),k=document.createElement("td"),v=mxUtils.bind(this,function(b,c,g){var d=document.createElement("input");d.type="checkbox";y.appendChild(d);d.checked=a.sidebar.isEntryVisible(g);var l=document.createElement("span");mxUtils.write(l,c);c=document.createElement("div");
-c.style.display="block";c.appendChild(d);c.appendChild(l);mxEvent.addListener(l,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return d.checked?g:null}});m.appendChild(c);m.appendChild(f);m.appendChild(k);p.appendChild(m);y.appendChild(p);for(var t=[],x=0,h=0;h<b.length;h++)for(p=0;p<b[h].entries.length;p++)x++;for(var E=[c,f,k],F=0,h=0;h<b.length;h++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];t.push(v(E[Math.floor(F/(x/3))],
+"geBtn gePrimaryBtn"}else{var y=document.createElement("table"),p=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";m=document.createElement("tr");y.style.width="100%";c=document.createElement("td");var f=document.createElement("td"),k=document.createElement("td"),u=mxUtils.bind(this,function(b,c,g){var d=document.createElement("input");d.type="checkbox";y.appendChild(d);d.checked=a.sidebar.isEntryVisible(g);var l=document.createElement("span");mxUtils.write(l,c);c=document.createElement("div");
+c.style.display="block";c.appendChild(d);c.appendChild(l);mxEvent.addListener(l,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return d.checked?g:null}});m.appendChild(c);m.appendChild(f);m.appendChild(k);p.appendChild(m);y.appendChild(p);for(var t=[],x=0,h=0;h<b.length;h++)for(p=0;p<b[h].entries.length;p++)x++;for(var E=[c,f,k],F=0,h=0;h<b.length;h++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];t.push(u(E[Math.floor(F/(x/3))],
c.title,c.id));F++}})(b[h]);d.appendChild(y);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";w=document.createElement("input");isLocalStorage&&(w.setAttribute("type","checkbox"),w.checked=!0,w.defaultChecked=!0,b.appendChild(w),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),b.appendChild(p),mxEvent.addListener(p,"click",function(a){w.checked=!w.checked;mxEvent.consume(a)}));d.appendChild(b);p=mxUtils.button(mxResources.get("cancel"),
function(){a.hideDialog()});p.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<t.length;c++){var g=t[c].apply(this,arguments);null!=g&&b.push(g)}a.sidebar.showEntries(0<b.length?b.join(";"):"",w.checked);a.hideDialog()});c.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right"}a.editor.cancelFirst?(b.appendChild(p),b.appendChild(c)):(b.appendChild(c),b.appendChild(p));d.appendChild(b);this.container=
d},PluginsDialog=function(a){function c(){if(0==f.length)d.innerHTML=mxResources.get("noPlugins");else{d.innerHTML="";for(var b=0;b<f.length;b++){var g=document.createElement("span");g.style.whiteSpace="nowrap";var h=document.createElement("span");h.className="geSprite geSprite-delete";h.style.position="relative";h.style.cursor="pointer";h.style.top="5px";h.style.marginRight="4px";h.style.display="inline-block";g.appendChild(h);mxUtils.write(g,f[b]);d.appendChild(g);mxUtils.br(d);mxEvent.addListener(h,
@@ -7678,37 +7699,37 @@ k.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxS
"right";a.editor.cancelFirst?(g.appendChild(k),g.appendChild(p),g.appendChild(h),g.appendChild(m)):(g.appendChild(p),g.appendChild(h),g.appendChild(m),g.appendChild(k));b.appendChild(g);this.container=b},CropImageDialog=function(a,c,b){var d=document.createElement("div"),f=document.createElement("table"),h=document.createElement("tbody"),k=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";m.setAttribute("colspan","2");mxUtils.write(m,mxResources.get("loading")+
"...");k.appendChild(m);h.appendChild(k);var k=document.createElement("tr"),p=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("left")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";this.init=function(){l.focus();l.select()};g.appendChild(l);k.appendChild(p);k.appendChild(g);h.appendChild(k);k=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");
mxUtils.write(p,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";g.appendChild(n);k.appendChild(p);k.appendChild(g);h.appendChild(k);k=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";g.appendChild(q);k.appendChild(p);k.appendChild(g);
-h.appendChild(k);k=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";g.appendChild(t);k.appendChild(p);k.appendChild(g);h.appendChild(k);k=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("circle")+":");k.appendChild(p);var u=document.createElement("input");
-u.setAttribute("type","checkbox");g.appendChild(u);k.appendChild(g);h.appendChild(k);f.appendChild(h);d.appendChild(f);var f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),g=c.getContext("2d"),d=w.width,f=w.height,h=parseInt(l.value),k=parseInt(n.value),d=Math.max(1,d-h-parseInt(q.value)),f=Math.max(1,f-k-parseInt(t.value));c.width=d;c.height=f;u.checked&&(g.fillStyle=
+h.appendChild(k);k=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";g.appendChild(t);k.appendChild(p);k.appendChild(g);h.appendChild(k);k=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("circle")+":");k.appendChild(p);var v=document.createElement("input");
+v.setAttribute("type","checkbox");g.appendChild(v);k.appendChild(g);h.appendChild(k);f.appendChild(h);d.appendChild(f);var f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),g=c.getContext("2d"),d=w.width,f=w.height,h=parseInt(l.value),k=parseInt(n.value),d=Math.max(1,d-h-parseInt(q.value)),f=Math.max(1,f-k-parseInt(t.value));c.width=d;c.height=f;v.checked&&(g.fillStyle=
"#000000",g.arc(d/2,f/2,Math.min(d/2,f/2),0,2*Math.PI),g.fill(),g.globalCompositeOperation="source-in");g.drawImage(w,h,k,d,f,0,0,d,f);b(c.toDataURL())});y.setAttribute("disabled","disabled");w.onload=function(){y.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+": "+w.height)};w.src=c;mxEvent.addListener(d,"keypress",function(a){13==a.keyCode&&y.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign=
"right";a.editor.cancelFirst?(c.appendChild(f),c.appendChild(y)):(c.appendChild(y),c.appendChild(f));d.appendChild(c);this.container=d},EditGeometryDialog=function(a,c){var b=a.editor.graph,d=1==c.length?b.getCellGeometry(c[0]):null,f=document.createElement("div"),h=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),p=document.createElement("td"),g=document.createElement("td");h.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("relative")+":");
var l=document.createElement("input");l.setAttribute("type","checkbox");null!=d&&d.relative&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);this.init=function(){l.focus()};g.appendChild(l);m.appendChild(p);m.appendChild(g);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("left")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.x:"";
g.appendChild(n);m.appendChild(p);m.appendChild(g);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d?d.y:"";g.appendChild(q);m.appendChild(p);m.appendChild(g);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("dx")+
-":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d&&null!=d.offset?d.offset.x:"";g.appendChild(t);m.appendChild(p);m.appendChild(g);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("dy")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=d&&null!=d.offset?d.offset.y:"";g.appendChild(u);m.appendChild(p);
+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=d&&null!=d.offset?d.offset.x:"";g.appendChild(t);m.appendChild(p);m.appendChild(g);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d&&null!=d.offset?d.offset.y:"";g.appendChild(v);m.appendChild(p);
m.appendChild(g);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("width")+":");var w=document.createElement("input");w.setAttribute("type","text");w.style.width="100px";w.value=null!=d?d.width:"";g.appendChild(w);m.appendChild(p);m.appendChild(g);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("height")+":");var y=
-document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=d?d.height:"";g.appendChild(y);m.appendChild(p);m.appendChild(g);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("rotation")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
-g.appendChild(v);m.appendChild(p);m.appendChild(g);k.appendChild(m);h.appendChild(k);f.appendChild(h);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var g=0;g<c.length;g++){var d=b.getCellGeometry(c[g]);null!=d&&(d=d.clone(),b.isCellMovable(c[g])&&(d.relative=l.checked,0<mxUtils.trim(n.value).length&&(d.x=Number(n.value)),0<mxUtils.trim(q.value).length&&
-(d.y=Number(q.value)),0<mxUtils.trim(t.value).length&&(null==d.offset&&(d.offset=new mxPoint),d.offset.x=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==d.offset&&(d.offset=new mxPoint),d.offset.y=Number(u.value))),b.isCellResizable(c[g])&&(0<mxUtils.trim(w.value).length&&(d.width=Number(w.value)),0<mxUtils.trim(y.value).length&&(d.height=Number(y.value))),b.getModel().setGeometry(c[g],d));0<mxUtils.trim(v.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(v.value),[c[g]])}}finally{b.getModel().endUpdate()}});
+document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=d?d.height:"";g.appendChild(y);m.appendChild(p);m.appendChild(g);k.appendChild(m);m=document.createElement("tr");p=document.createElement("td");g=document.createElement("td");mxUtils.write(p,mxResources.get("rotation")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
+g.appendChild(u);m.appendChild(p);m.appendChild(g);k.appendChild(m);h.appendChild(k);f.appendChild(h);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var g=0;g<c.length;g++){var d=b.getCellGeometry(c[g]);null!=d&&(d=d.clone(),b.isCellMovable(c[g])&&(d.relative=l.checked,0<mxUtils.trim(n.value).length&&(d.x=Number(n.value)),0<mxUtils.trim(q.value).length&&
+(d.y=Number(q.value)),0<mxUtils.trim(t.value).length&&(null==d.offset&&(d.offset=new mxPoint),d.offset.x=Number(t.value)),0<mxUtils.trim(v.value).length&&(null==d.offset&&(d.offset=new mxPoint),d.offset.y=Number(v.value))),b.isCellResizable(c[g])&&(0<mxUtils.trim(w.value).length&&(d.width=Number(w.value)),0<mxUtils.trim(y.value).length&&(d.height=Number(y.value))),b.getModel().setGeometry(c[g],d));0<mxUtils.trim(u.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[c[g]])}}finally{b.getModel().endUpdate()}});
x.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&x.click()});h=document.createElement("div");h.style.marginTop="20px";h.style.textAlign="right";a.editor.cancelFirst?(h.appendChild(d),h.appendChild(x)):(h.appendChild(x),h.appendChild(d));f.appendChild(h);this.container=f},LibraryDialog=function(a,c,b,d,f,h){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var b=null;if(null!=a)for(var c=t.firstChild,
-b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function m(b,c,g,d,n,f,h,v,q){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=h||null==w[b]){var p=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));I.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};t.style.backgroundImage="";u.style.display="none";var z=n,A=f;if(n>a.maxImageSize||f>
+b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function m(b,c,g,d,n,f,h,u,q){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=h||null==w[b]){var p=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));I.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};t.style.backgroundImage="";v.style.display="none";var z=n,A=f;if(n>a.maxImageSize||f>
a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,n)),a.maxImageSize/Math.max(1,f));n*=C;f*=C}z>A?(A=Math.round(100*A/z),z=100):(z=Math.round(100*z/A),A=100);var G=document.createElement("div");G.setAttribute("draggable","true");G.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";G.style.position="relative";G.style.cursor="move";mxUtils.setPrefixedStyle(G.style,"transition","transform .1s ease-in-out");if(null!=b){var H=document.createElement("img");H.setAttribute("src",E.convert(b));
H.style.width=z+"px";H.style.height=A+"px";H.style.margin="10px";H.style.paddingBottom=Math.floor((100-A)/2)+"px";H.style.paddingLeft=Math.floor((100-z)/2)+"px";G.appendChild(H)}else if(null!=h){var D=a.stringToCells(a.editor.graph.decompress(h.xml));0<D.length&&(a.sidebar.createThumb(D,100,100,G,null,!0,!1),G.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",G.firstChild.style.cursor="")}var B=document.createElement("img");B.setAttribute("src",Editor.closeImage);B.setAttribute("border",
"0");B.setAttribute("title",mxResources.get("delete"));B.setAttribute("align","top");B.style.paddingTop="4px";B.style.position="absolute";B.style.marginLeft="-12px";B.style.zIndex="1";B.style.cursor="pointer";mxEvent.addListener(B,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(B,"click",function(g){w[b]=null;for(var d=0;d<l.length;d++)if(null!=l[d].data&&l[d].data==b||null!=l[d].xml&&null!=c&&l[d].xml==c.xml){l.splice(d,1);break}G.parentNode.removeChild(a);0==l.length&&
-(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(g)});mxEvent.addListener(B,"dblclick",function(a){mxEvent.consume(a)})})(G,b,h);G.appendChild(B);G.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var L=null;null!=b?(L={data:b,
-w:n,h:f,title:q},null!=v&&(L.aspect=v),w[b]=H,l.push(L)):null!=h&&(h.aspect="fixed",l.push(h),L=h);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});p();G.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});D=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,L.title||"",mxResources.get("ok"),
+(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(g)});mxEvent.addListener(B,"dblclick",function(a){mxEvent.consume(a)})})(G,b,h);G.appendChild(B);G.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var L=null;null!=b?(L={data:b,
+w:n,h:f,title:q},null!=u&&(L.aspect=u),w[b]=H,l.push(L)):null!=h&&(h.aspect="fixed",l.push(h),L=h);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});p();G.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});D=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,L.title||"",mxResources.get("ok"),
function(a){null!=a&&(L.title=a,p())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==L.title||0==L.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");I.focus();document.execCommand("selectAll",!1,null);x=function(){I.removeAttribute("contentEditable");I.style.cursor=
"pointer";L.title=I.innerHTML;p()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",D);mxEvent.addListener(G,"dblclick",D);t.appendChild(G);mxEvent.addListener(G,"dragstart",function(a){null==b&&null!=h&&(B.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=h.xml&&a.dataTransfer.setData("Text",h.xml);y=k(a);mxClient.IS_GC&&(G.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(G.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(G,30);B.style.visibility=
"";I.style.visibility=""},0)});mxEvent.addListener(G,"dragend",function(a){"hidden"==B.style.visibility&&(B.style.visibility="",I.style.visibility="");y=null;mxUtils.setOpacity(G,100);mxUtils.setPrefixedStyle(G.style,"transform",null)})}else F||(F=!0,a.handleError({message:mxResources.get("fileExists")}));else{n=!1;try{if(a.spinner.stop(),z=mxUtils.parseXml(b),"mxlibrary"==z.documentElement.nodeName){A=JSON.parse(mxUtils.getTextContent(z.documentElement));if(null!=A&&0<A.length)for(var M=0;M<A.length;M++)null!=
A[M].xml?m(null,null,0,0,0,0,A[M]):m(A[M].data,null,0,0,A[M].w,A[M].h,null,"fixed",A[M].title);n=!0}else if("mxfile"==z.documentElement.nodeName){for(var J=z.documentElement.getElementsByTagName("diagram"),M=0;M<J.length;M++){var A=mxUtils.getTextContent(J[M]),D=a.stringToCells(a.editor.graph.decompress(A)),S=a.editor.graph.getBoundingBoxFromGeometry(D);m(null,null,0,0,0,0,{xml:A,w:S.width,h:S.height})}n=!0}}catch(ba){}n||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}
-function p(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function g(b){b.stopPropagation();b.preventDefault();F=!1;v=k(b);if(null!=y)null!=v&&v<t.children.length?(l.splice(v>y?v-1:v,0,l.splice(y,1)[0]),t.insertBefore(t.children[y],t.children[v])):(l.push(l.splice(y,1)[0]),t.appendChild(t.children[y]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,z(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=
+function p(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function g(b){b.stopPropagation();b.preventDefault();F=!1;u=k(b);if(null!=y)null!=u&&u<t.children.length?(l.splice(u>y?u-1:u,0,l.splice(y,1)[0]),t.insertBefore(t.children[y],t.children[u])):(l.push(l.splice(y,1)[0]),t.appendChild(t.children[y]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,z(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=
decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){m(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var l=[];b=document.createElement("div");b.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";b.appendChild(n);mxUtils.write(n,mxResources.get("filename")+
":");null==c&&(c=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",c);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==f||f.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==f||f.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};n.appendChild(q);var t=document.createElement("div");t.style.borderWidth=
-"1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==l.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";
-mxUtils.write(u,mxResources.get("dragImagesHere"));b.appendChild(u);var w={},y=null,v=null,x=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=x&&(x(),x=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",c);mxEvent.addListener(t,"pointerdown",c);mxEvent.addListener(t,"touchstart",c);var E=new mxUrlConverter,F=!1;if(null!=d)for(c=0;c<d.length;c++)n=d[c],m(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(t,"dragleave",function(a){u.style.cursor=
-"";for(var b=mxEvent.getSource(a);null!=b;){if(b==t||b==u){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var z=function(b){return function(c,g,d,l,n,f,h,v,q){null!=q&&(/(\.vsdx)($|\?)/i.test(q.name)||/(\.vssx)($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(c){a.spinner.stop();m(c,g,d,l,n,f,h,"fixed",mxEvent.isAltDown(b)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,q.name)?
-a.parseFile(q,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(m(c.responseText,g,d,l,n,f,h,"fixed",mxEvent.isAltDown(b)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(m(c,g,d,l,n,f,h,"fixed",mxEvent.isAltDown(b)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",p);mxEvent.addListener(t,"drop",g);mxEvent.addListener(u,"dragover",p);mxEvent.addListener(u,
+"1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==l.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";
+mxUtils.write(v,mxResources.get("dragImagesHere"));b.appendChild(v);var w={},y=null,u=null,x=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=x&&(x(),x=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",c);mxEvent.addListener(t,"pointerdown",c);mxEvent.addListener(t,"touchstart",c);var E=new mxUrlConverter,F=!1;if(null!=d)for(c=0;c<d.length;c++)n=d[c],m(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(t,"dragleave",function(a){v.style.cursor=
+"";for(var b=mxEvent.getSource(a);null!=b;){if(b==t||b==v){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var z=function(b){return function(c,g,d,l,n,f,h,u,q){null!=q&&(/(\.vsdx)($|\?)/i.test(q.name)||/(\.vssx)($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(c){a.spinner.stop();m(c,g,d,l,n,f,h,"fixed",mxEvent.isAltDown(b)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,q.name)?
+a.parseFile(q,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(m(c.responseText,g,d,l,n,f,h,"fixed",mxEvent.isAltDown(b)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(m(c,g,d,l,n,f,h,"fixed",mxEvent.isAltDown(b)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",p);mxEvent.addListener(t,"drop",g);mxEvent.addListener(v,"dragover",p);mxEvent.addListener(v,
"drop",g);b.appendChild(t);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&d.appendChild(c);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(l),c=q.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,
-"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";d.appendChild(n);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(b){F=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,c,g,d,l,n,f,h,v){z(b)(a,c,g,d,l,n,f,h,v);A.value=""});t.scrollTop=t.scrollHeight}),n=mxUtils.button(mxResources.get("import"),
+"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";d.appendChild(n);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(b){F=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,c,g,d,l,n,f,h,u){z(b)(a,c,g,d,l,n,f,h,u);A.value=""});t.scrollTop=t.scrollHeight}),n=mxUtils.button(mxResources.get("import"),
function(){null!=x&&(x(),x=null);A.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=x&&(x(),x=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){F=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var g=a.indexOf(",");0<g&&(a=a.substring(0,g)+";base64,"+a.substring(g+1))}m(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";
d.appendChild(n);this.saveBtnClickHandler=function(b,c,g,d){a.saveLibrary(b,c,g,d)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(q.value,l,f,h)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";d.appendChild(n);a.editor.cancelFirst||d.appendChild(c);b.appendChild(d);this.container=b},EditShapeDialog=function(a,c,b,d,f){d=null!=d?d:300;f=null!=f?f:120;var h,k,m=document.createElement("table"),p=document.createElement("tbody");
m.style.cellPadding="4px";h=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,b);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");var g=document.createElement("textarea");g.style.outline="none";g.style.resize="none";g.style.width=d-200+"px";g.style.height=f+"px";this.textarea=g;this.init=function(){g.focus();g.scrollTop=0};k.appendChild(g);h.appendChild(k);k=document.createElement("td");
@@ -7726,24 +7747,27 @@ var a=window.innerWidth,b=window.innerHeight,d=987,f=712;.9*a<d&&(d=Math.max(.9*
TemplatesDialog.prototype.init=function(a,c,b,d,f,h,k,m,p,g){function l(){null!=B&&(B.style.fontWeight="normal",B.style.textDecoration="none",B=null)}function n(a,b,c,g,d,l,n){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";z.querySelector(".geTempDlgRadioBtn[data-id="+g+"]").className="geTempDlgRadioBtn "+(n?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");z.querySelector("."+b).src="/images/"+c+"-sel.svg";z.querySelector("."+d).src="/images/"+
l+".svg";return!0}function q(a){function b(a){Z.removeChild(g);z.removeChild(c);Z.scrollTop=l}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var c=document.createElement("div");c.className="geTempDlgDialogMask";z.appendChild(c);var g=document.createElement("div");g.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;g.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
a.setAttribute("title",mxResources.get("close"));g.appendChild(a);var l=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(c,"click",b);Z.appendChild(g);Z.scrollTop=0;g.style.lineHeight=g.clientHeight+"px"}function t(a,b,c){if(null!=H){for(var g=H.className.split(" "),d=0;d<g.length;d++)if(-1<g[d].indexOf("Active")){g.splice(d,1);break}H.className=g.join(" ")}null!=a?(H=a,H.className+=" "+b,J=c,N.className="geTempDlgCreateBtn"):(J=H=null,N.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function u(b){if(null!=J){var d=J;J=null;N.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";d.isExternal?(1==b?g(d.url,d,"nameInput.value"):p(d.url,d,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+d.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function w(a){a=a?"":"none";for(var b=z.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
+function v(b){if(null!=J){var d=J;J=null;N.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";d.isExternal?(1==b?g(d.url,d,"nameInput.value"):p(d.url,d,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+d.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function w(a){a=a?"":"none";for(var b=z.querySelectorAll(".geTempDlgLinkToDiagram"),c=0;c<b.length;c++)b[c].style.display=
a}function y(a,b,c){function g(){N.innerHTML=b?mxResources.get("create"):mxResources.get("copy");w(!b)}R.innerHTML="";t();M=a;var d=null;if(c){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),n=document.createElement("th");n.style.width="50%";n.innerHTML=mxResources.get("diagram",null,"Diagram");l.appendChild(n);n=document.createElement("th");n.style.width="25%";n.innerHTML=mxResources.get("changedBy",null,"Changed By");l.appendChild(n);
-n=document.createElement("th");n.style.width="25%";n.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");l.appendChild(n);d.appendChild(l);R.appendChild(d)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var f=a[l].url,n=mxUtils.htmlEntities(a[l].title),h=a[l].tooltip||a[l].title,v=a[l].imgUrl,k=mxUtils.htmlEntities(a[l].changedBy||""),E=mxUtils.htmlEntities(a[l].lastModifiedOn||"");v||(v=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=c?50:15;null!=n&&n.length>f&&(n=n.substring(0,
-f)+"&hellip;");if(c){var x=document.createElement("tr"),v=document.createElement("td"),m=document.createElement("img");m.src="/images/icon-search.svg";m.className="geTempDlgDiagramListPreviewBtn";m.setAttribute("title",mxResources.get("preview"));v.appendChild(m);h=document.createElement("span");h.className="geTempDlgDiagramTitle";h.innerHTML=n;v.appendChild(h);x.appendChild(v);v=document.createElement("td");v.innerHTML=k;x.appendChild(v);v=document.createElement("td");v.innerHTML=E;x.appendChild(v);
-d.appendChild(x);null==H&&(g(),t(x,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(x,"click",function(){H!=b&&(g(),t(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(x,"dblclick",u);mxEvent.addListener(m,"click",function(){q(a)})})(a[l],x)}else{var F=document.createElement("div");F.className="geTempDlgDiagramTile";F.setAttribute("title",h);null==H&&(g(),t(F,"geTempDlgDiagramTileActive",a[l]));k=document.createElement("div");k.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
-var p=document.createElement("img");p.style.display="none";(function(a,b){p.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};p.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(p,k);p.src=v;k.appendChild(p);F.appendChild(k);k=document.createElement("div");k.className="geTempDlgDiagramTileLbl";k.innerHTML=null!=n?n:"";F.appendChild(k);m=document.createElement("img");m.src="/images/icon-search.svg";m.className="geTempDlgDiagramPreviewBtn";
-m.setAttribute("title",mxResources.get("preview"));F.appendChild(m);(function(a,b){mxEvent.addListener(F,"click",function(){H!=b&&(g(),t(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(F,"dblclick",u);mxEvent.addListener(m,"click",function(){q(a)})})(a[l],F);R.appendChild(F)}}}function v(a,b){Q.innerHTML="";t();for(var c=!b&&5<a.length?5:a.length,g=0;g<c;g++){var d=a[g];d.isCategory=!0;var l=document.createElement("div"),n=mxResources.get(d.title);null==n&&(n=d.title.substring(0,1).toUpperCase()+
+n=document.createElement("th");n.style.width="25%";n.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");l.appendChild(n);d.appendChild(l);R.appendChild(d)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var f=a[l].url,n=mxUtils.htmlEntities(a[l].title),h=a[l].tooltip||a[l].title,u=a[l].imgUrl,k=mxUtils.htmlEntities(a[l].changedBy||""),E=mxUtils.htmlEntities(a[l].lastModifiedOn||"");u||(u=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=c?50:15;null!=n&&n.length>f&&(n=n.substring(0,
+f)+"&hellip;");if(c){var x=document.createElement("tr"),u=document.createElement("td"),m=document.createElement("img");m.src="/images/icon-search.svg";m.className="geTempDlgDiagramListPreviewBtn";m.setAttribute("title",mxResources.get("preview"));u.appendChild(m);h=document.createElement("span");h.className="geTempDlgDiagramTitle";h.innerHTML=n;u.appendChild(h);x.appendChild(u);u=document.createElement("td");u.innerHTML=k;x.appendChild(u);u=document.createElement("td");u.innerHTML=E;x.appendChild(u);
+d.appendChild(x);null==H&&(g(),t(x,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(x,"click",function(){H!=b&&(g(),t(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(x,"dblclick",v);mxEvent.addListener(m,"click",function(){q(a)})})(a[l],x)}else{var F=document.createElement("div");F.className="geTempDlgDiagramTile";F.setAttribute("title",h);null==H&&(g(),t(F,"geTempDlgDiagramTileActive",a[l]));k=document.createElement("div");k.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
+var p=document.createElement("img");p.style.display="none";(function(a,b){p.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};p.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(p,k);p.src=u;k.appendChild(p);F.appendChild(k);k=document.createElement("div");k.className="geTempDlgDiagramTileLbl";k.innerHTML=null!=n?n:"";F.appendChild(k);m=document.createElement("img");m.src="/images/icon-search.svg";m.className="geTempDlgDiagramPreviewBtn";
+m.setAttribute("title",mxResources.get("preview"));F.appendChild(m);(function(a,b){mxEvent.addListener(F,"click",function(){H!=b&&(g(),t(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(F,"dblclick",v);mxEvent.addListener(m,"click",function(){q(a)})})(a[l],F);R.appendChild(F)}}}function u(a,b){Q.innerHTML="";t();for(var c=!b&&5<a.length?5:a.length,g=0;g<c;g++){var d=a[g];d.isCategory=!0;var l=document.createElement("div"),n=mxResources.get(d.title);null==n&&(n=d.title.substring(0,1).toUpperCase()+
d.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",n);n=mxUtils.htmlEntities(n);15<n.length&&(n=n.substring(0,15)+"&hellip;");null==H&&(N.innerHTML=mxResources.get("create"),w(),t(l,"geTempDlgNewDiagramCatItemActive",d));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var h=document.createElement("img");h.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;f.appendChild(h);l.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";
-f.innerHTML=n;l.appendChild(f);Q.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){H!=b&&(N.innerHTML=mxResources.get("create"),w(),t(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",u)})(d,l)}T.style.display=5>a.length?"none":""}function x(a){var b=z.querySelector(".geTemplatesList"),c;for(c in a){var g=document.createElement("div"),d=mxResources.get(c),l=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));g.className="geTemplateCatLink";
+f.innerHTML=n;l.appendChild(f);Q.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){H!=b&&(N.innerHTML=mxResources.get("create"),w(),t(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(d,l)}T.style.display=5>a.length?"none":""}function x(a){var b=z.querySelector(".geTemplatesList"),c;for(c in a){var g=document.createElement("div"),d=mxResources.get(c),l=a[c];null==d&&(d=c.substring(0,1).toUpperCase()+c.substring(1));g.className="geTemplateCatLink";
g.setAttribute("title",d+" ("+l.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");g.innerHTML=d+" ("+l.length+")";b.appendChild(g);(function(b,c,d){mxEvent.addListener(g,"click",function(){B!=d&&(null!=B?(B.style.fontWeight="normal",B.style.textDecoration="none"):(O.style.display="none",aa.style.minHeight="100%"),B=d,B.style.fontWeight="bold",B.style.textDecoration="underline",Z.scrollTop=0,A&&(G=!0),V.innerHTML=c,Y.style.display="none",y(a[b],!0))})})(c,d,g)}}function E(a){k&&
(Z.scrollTop=0,R.innerHTML="",X.spin(R),G=!1,A=!0,V.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),L=null,k(da,a?null:h))}function F(a){l();Z.scrollTop=0;R.innerHTML="";X.spin(R);G=!1;A=!0;W=null;V.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';m(a,da,D?null:h);L=a}d=null!=d?d:TEMPLATE_PATH+"/index.xml";f=null!=f?f:NEW_DIAGRAM_CATS_PATH+"/index.xml";var z=this.container,A=!1,G=!1,B=null,H=null,J=null,C=!1,D=!0,I=!1,M=[],L,T=z.querySelector(".geTempDlgShowAllBtn"),
R=z.querySelector(".geTempDlgDiagramsTiles"),V=z.querySelector(".geTempDlgDiagramsListTitle"),Y=z.querySelector(".geTempDlgDiagramsListBtns"),Z=z.querySelector(".geTempDlgContent"),aa=z.querySelector(".geTempDlgDiagramsList"),O=z.querySelector(".geTempDlgNewDiagramCat"),Q=z.querySelector(".geTempDlgNewDiagramCatList"),N=z.querySelector(".geTempDlgCreateBtn"),X=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(z.querySelector(".geTempDlgNewDiagramlbl"),
"click",function(){l();O.style.display="";aa.style.minHeight="calc(100% - 280px)";E(D)});mxEvent.addListener(z.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){n(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(D=!0,null==L?E(D):F(L))});mxEvent.addListener(z.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){n(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
"all-diagrams",!0)&&(D=!1,null==L?E(D):F(L))});mxEvent.addListener(z.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){n(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(I=!0,y(M,!1,I))});mxEvent.addListener(z.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){n(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(I=!1,y(M,!1,I))});mxEvent.addListener(T,"click",function(){C?(O.style.height="280px",
-Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),v(ba)):(O.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),v(ba,!0));C=!C});var P=!1,U=!1,S={},ba=[],K=1;mxUtils.get(d,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=S[b];null==c&&(K++,c=[],S[b]=c);c.push({url:a.getAttribute("url"),
-libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}x(S)}});mxUtils.get(f,function(a){if(!U){U=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ba.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;v(ba)}});var da=function(a,b){Y.style.display="";X.stop();A=!1;G?G=!1:b?R.innerHTML=
-b:0==a.length?R.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,I)};E(D);var W=null;m&&mxEvent.addListener(z.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=W&&clearTimeout(W);13==a.keyCode?F(b.value):W=setTimeout(function(){F(b.value)},500)});mxEvent.addListener(N,"click",u);mxEvent.addListener(z.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){u(!0)});mxEvent.addListener(z.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
-b&&b();a.hideDialog(!0)})};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
+Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),u(ba)):(O.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),u(ba,!0));C=!C});var P=!1,U=!1,S={},ba=[],K=1;mxUtils.get(d,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=S[b];null==c&&(K++,c=[],S[b]=c);c.push({url:a.getAttribute("url"),
+libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}x(S)}});mxUtils.get(f,function(a){if(!U){U=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ba.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;u(ba)}});var da=function(a,b){Y.style.display="";X.stop();A=!1;G?G=!1:b?R.innerHTML=
+b:0==a.length?R.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,I)};E(D);var W=null;m&&mxEvent.addListener(z.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=W&&clearTimeout(W);13==a.keyCode?F(b.value):W=setTimeout(function(){F(b.value)},500)});mxEvent.addListener(N,"click",v);mxEvent.addListener(z.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(z.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
+b&&b();a.hideDialog(!0)})};
+var BtnDialog=function(a,c,b,d){var f=document.createElement("div");f.style.textAlign="center";var h=document.createElement("p");h.style.fontSize="16pt";h.style.padding="0px";h.style.margin="0px";h.style.color="gray";mxUtils.write(h,mxResources.get("done"));var k="Unknown",m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.marginRight="10px";c==a.drive?(k=mxResources.get("googleDrive"),m.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?
+(k=mxResources.get("dropbox"),m.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(k=mxResources.get("oneDrive"),m.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(k=mxResources.get("github"),m.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(k=mxResources.get("trello"),m.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"You are now authorized in {1}"));b=mxUtils.button(b,d);b.insertBefore(m,b.firstChild);
+b.style.marginTop="6px";b.className="geBigButton";f.appendChild(h);f.appendChild(a);f.appendChild(b);this.container=f};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
IMAGE_PATH+"/spin.gif";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
@@ -7814,20 +7838,20 @@ d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.cu
l.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},c=a.vertices,g=a.edges,d=0;d<c.length;d++)this.findCommonProperties(c[d],b,0==d);for(d=0;d<g.length;d++)this.findCommonProperties(g[d],b,0==c.length&&0==d);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var n=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");
b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return n.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,c){function g(a,b,c,g){t.getModel().beginUpdate();try{var d=[],l=[];if(null!=c.index){for(var n=[],f=c.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)n.push(f.getAttribute("data-pValue")),f=f.nextSibling;c.index<n.length?null!=g?n.splice(g,1):n[c.index]=b:n.push(b);null!=c.size&&n.length>
-c.size&&(n=n.slice(0,c.size));b=n.join(",");null!=c.countProperty&&(t.setCellStyles(c.countProperty,n.length,t.getSelectionCells()),d.push(c.countProperty),l.push(n.length))}t.setCellStyles(a,b,t.getSelectionCells());d.push(a);l.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var h=c.dependentPropsDefVal[a],v=c.dependentPropsVals[a];if(v.length>b)v=v.slice(0,b);else for(var k=v.length;k<b;k++)v.push(h);v=v.join(",");t.setCellStyles(c.dependentProps[a],v,t.getSelectionCells());
-d.push(c.dependentProps[a]);l.push(v)}q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",l,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function d(b,c,g){var d=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);c.style.position="absolute";c.style.left=l.x-d.x+"px";c.style.top=l.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(g?4:0)+"px";c.style.zIndex=5}function l(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height=
+c.size&&(n=n.slice(0,c.size));b=n.join(",");null!=c.countProperty&&(t.setCellStyles(c.countProperty,n.length,t.getSelectionCells()),d.push(c.countProperty),l.push(n.length))}t.setCellStyles(a,b,t.getSelectionCells());d.push(a);l.push(b);if(null!=c.dependentProps)for(a=0;a<c.dependentProps.length;a++){var h=c.dependentPropsDefVal[a],u=c.dependentPropsVals[a];if(u.length>b)u=u.slice(0,b);else for(var k=u.length;k<b;k++)u.push(h);u=u.join(",");t.setCellStyles(c.dependentProps[a],u,t.getSelectionCells());
+d.push(c.dependentProps[a]);l.push(u)}q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",l,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function d(b,c,g){var d=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);c.style.position="absolute";c.style.left=l.x-d.x+"px";c.style.top=l.y-d.y+"px";c.style.width=b.offsetWidth+"px";c.style.height=b.offsetHeight-(g?4:0)+"px";c.style.zIndex=5}function l(a,b,c){var d=document.createElement("div");d.style.width="32px";d.style.height=
"4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;g(a,b,c)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function n(a,b,c,d,l,n,f){null!=b&&(b=b.split(","),k.push({name:a,
-values:b,type:c,defVal:d,countProperty:l,parentRow:n,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(q,function(b){for(var h=n,q=0;null!=h.nextSibling;)if(h.nextSibling.getAttribute("data-pName")==a)h=h.nextSibling,q++;else break;var t={type:c,parentRow:n,index:q,isDeletable:!0,defVal:d,countProperty:l},q=v(a,"",t,0==q%2,f);g(a,d,t);h.parentNode.insertBefore(q,h.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function f(a,b,c,g,d,l,n){if(0<d){var f=Array(d);b=null!=b?b.split(","):[];for(var h=0;h<d;h++)f[h]=null!=b[h]?b[h]:null!=g?g:"";k.push({name:a,values:f,type:c,defVal:g,parentRow:l,flipBkg:n,size:d})}return document.createElement("div")}function h(a,b,c){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){g(a,d.checked?"1":"0",c)});return d}function v(b,c,v,t,k){var x=v.dispName,u=v.type,w=document.createElement("tr");w.className="gePropRow"+
-(k?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";w.setAttribute("data-pName",b);w.setAttribute("data-pValue",c);t=!1;null!=v.index&&(w.setAttribute("data-index",v.index),x=(null!=x?x:"")+"["+v.index+"]",t=!0);var m=document.createElement("td");m.className="gePropRowCell";m.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));t&&(m.style.textAlign="right");w.appendChild(m);m=document.createElement("td");m.className="gePropRowCell";if("color"==u)m.appendChild(l(b,c,v));else if("bool"==u||"boolean"==
-u)m.appendChild(h(b,c,v));else if("enum"==u){var p=v.enumList;for(k=0;k<p.length;k++)if(x=p[k],x.val==c){m.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(m,"click",mxUtils.bind(q,function(){var l=document.createElement("select");d(m,l);for(var n=0;n<p.length;n++){var f=p[n],h=document.createElement("option");h.value=mxUtils.htmlEntities(f.val);h.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));l.appendChild(h)}l.value=
-c;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);g(b,a,v)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==u?m.appendChild(n(b,c,v.subType,v.subDefVal,v.countProperty,w,k)):"staticArr"==u?m.appendChild(f(b,c,v.subType,v.subDefVal,v.size,w,k)):(m.innerHTML=c,mxEvent.addListener(m,"click",mxUtils.bind(q,function(){function l(){var a=n.value,a=0==a.length&&"string"!=u?0:a;v.allowAuto&&("auto"==a.trim().toLowerCase()?
-(a="auto",u="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=v.min&&a<v.min?a=v.min:null!=v.max&&a>v.max&&(a=v.max);a=mxUtils.htmlEntities(("int"==u?parseInt(a):a)+"");g(b,a,v)}var n=document.createElement("input");d(m,n,!0);n.value=c;n.className="gePropEditor";"int"!=u&&"float"!=u||v.allowAuto||(n.type="number",n.step="int"==u?"1":"any",null!=v.min&&(n.min=parseFloat(v.min)),null!=v.max&&(n.max=parseFloat(v.max)));a.appendChild(n);mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&l()});
-n.focus();mxEvent.addListener(n,"blur",function(){l()})})));v.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(q,function(a){g(b,"",v,v.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",m.appendChild(k));w.appendChild(m);return w}var q=this,t=this.editorUi.editor.graph,k=[];a.style.position="relative";a.style.padding="0";var u=document.createElement("table");u.style.whiteSpace="nowrap";u.style.width="100%";var x=document.createElement("tr");
-x.className="gePropHeader";var w=document.createElement("th");w.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;w.appendChild(m);mxUtils.write(w,mxResources.get("property"));x.style.cursor="pointer";var p=function(){var b=u.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){m.src=Sidebar.prototype.collapsedImage;c="none";for(var g=a.childNodes.length-1;0<=g;g--)try{var d=a.childNodes[g],l=d.nodeName.toUpperCase();"INPUT"!=
-l&&"SELECT"!=l||a.removeChild(d)}catch(ga){}}else m.src=Sidebar.prototype.expandedImage,c="";for(g=0;g<b.length;g++)b[g].style.display=c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;p()});x.appendChild(w);w=document.createElement("th");w.className="gePropHeaderCell";w.innerHTML=mxResources.get("value");x.appendChild(w);u.appendChild(x);var E=!1,F=!1,y;for(y in b)if(x=b[y],"function"!=typeof x.isVisible||x.isVisible(c)){var z=null!=c.style[y]?
-mxUtils.htmlEntities(c.style[y]+""):x.defVal;if("separator"==x.type)F=!F;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||b[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var X=x.dependentProps,P=[],U=[],w=0;w<X.length;w++){var S=c.style[X[w]];U.push(b[X[w]].subDefVal);P.push(null!=S?S.split(","):[])}x.dependentPropsDefVal=U;x.dependentPropsVals=P}u.appendChild(v(y,z,x,E,F));E=!E}}for(w=0;w<k.length;w++)for(x=k[w],b=x.parentRow,c=0;c<x.values.length;c++)y=v(x.name,
-x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),b.parentNode.insertBefore(y,b.nextSibling),b=y;a.appendChild(u);p();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){g.getModel().beginUpdate();try{var c=g.getSelectionCells();for(b=0;b<c.length;b++){for(var d=g.getModel().getStyle(c[b]),n=0;n<l.length;n++)d=mxUtils.removeStylename(d,
+values:b,type:c,defVal:d,countProperty:l,parentRow:n,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(q,function(b){for(var h=n,q=0;null!=h.nextSibling;)if(h.nextSibling.getAttribute("data-pName")==a)h=h.nextSibling,q++;else break;var t={type:c,parentRow:n,index:q,isDeletable:!0,defVal:d,countProperty:l},q=u(a,"",t,0==q%2,f);g(a,d,t);h.parentNode.insertBefore(q,h.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function f(a,b,c,g,d,l,n){if(0<d){var f=Array(d);b=null!=b?b.split(","):[];for(var h=0;h<d;h++)f[h]=null!=b[h]?b[h]:null!=g?g:"";k.push({name:a,values:f,type:c,defVal:g,parentRow:l,flipBkg:n,size:d})}return document.createElement("div")}function h(a,b,c){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){g(a,d.checked?"1":"0",c)});return d}function u(b,c,u,t,k){var x=u.dispName,v=u.type,w=document.createElement("tr");w.className="gePropRow"+
+(k?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";w.setAttribute("data-pName",b);w.setAttribute("data-pValue",c);t=!1;null!=u.index&&(w.setAttribute("data-index",u.index),x=(null!=x?x:"")+"["+u.index+"]",t=!0);var m=document.createElement("td");m.className="gePropRowCell";m.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));t&&(m.style.textAlign="right");w.appendChild(m);m=document.createElement("td");m.className="gePropRowCell";if("color"==v)m.appendChild(l(b,c,u));else if("bool"==v||"boolean"==
+v)m.appendChild(h(b,c,u));else if("enum"==v){var p=u.enumList;for(k=0;k<p.length;k++)if(x=p[k],x.val==c){m.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(m,"click",mxUtils.bind(q,function(){var l=document.createElement("select");d(m,l);for(var n=0;n<p.length;n++){var f=p[n],h=document.createElement("option");h.value=mxUtils.htmlEntities(f.val);h.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));l.appendChild(h)}l.value=
+c;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);g(b,a,u)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==v?m.appendChild(n(b,c,u.subType,u.subDefVal,u.countProperty,w,k)):"staticArr"==v?m.appendChild(f(b,c,u.subType,u.subDefVal,u.size,w,k)):(m.innerHTML=c,mxEvent.addListener(m,"click",mxUtils.bind(q,function(){function l(){var a=n.value,a=0==a.length&&"string"!=v?0:a;u.allowAuto&&("auto"==a.trim().toLowerCase()?
+(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=u.min&&a<u.min?a=u.min:null!=u.max&&a>u.max&&(a=u.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");g(b,a,u)}var n=document.createElement("input");d(m,n,!0);n.value=c;n.className="gePropEditor";"int"!=v&&"float"!=v||u.allowAuto||(n.type="number",n.step="int"==v?"1":"any",null!=u.min&&(n.min=parseFloat(u.min)),null!=u.max&&(n.max=parseFloat(u.max)));a.appendChild(n);mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&l()});
+n.focus();mxEvent.addListener(n,"blur",function(){l()})})));u.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(q,function(a){g(b,"",u,u.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",m.appendChild(k));w.appendChild(m);return w}var q=this,t=this.editorUi.editor.graph,k=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");
+x.className="gePropHeader";var w=document.createElement("th");w.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;w.appendChild(m);mxUtils.write(w,mxResources.get("property"));x.style.cursor="pointer";var p=function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){m.src=Sidebar.prototype.collapsedImage;c="none";for(var g=a.childNodes.length-1;0<=g;g--)try{var d=a.childNodes[g],l=d.nodeName.toUpperCase();"INPUT"!=
+l&&"SELECT"!=l||a.removeChild(d)}catch(ga){}}else m.src=Sidebar.prototype.expandedImage,c="";for(g=0;g<b.length;g++)b[g].style.display=c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;p()});x.appendChild(w);w=document.createElement("th");w.className="gePropHeaderCell";w.innerHTML=mxResources.get("value");x.appendChild(w);v.appendChild(x);var E=!1,F=!1,y;for(y in b)if(x=b[y],"function"!=typeof x.isVisible||x.isVisible(c)){var z=null!=c.style[y]?
+mxUtils.htmlEntities(c.style[y]+""):x.defVal;if("separator"==x.type)F=!F;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||b[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var X=x.dependentProps,P=[],U=[],w=0;w<X.length;w++){var S=c.style[X[w]];U.push(b[X[w]].subDefVal);P.push(null!=S?S.split(","):[])}x.dependentPropsDefVal=U;x.dependentPropsVals=P}v.appendChild(u(y,z,x,E,F));E=!E}}for(w=0;w<k.length;w++)for(x=k[w],b=x.parentRow,c=0;c<x.values.length;c++)y=u(x.name,
+x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),b.parentNode.insertBefore(y,b.nextSibling),b=y;a.appendChild(v);p();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){g.getModel().beginUpdate();try{var c=g.getSelectionCells();for(b=0;b<c.length;b++){for(var d=g.getModel().getStyle(c[b]),n=0;n<l.length;n++)d=mxUtils.removeStylename(d,
l[n]);var f=g.getModel().isVertex(c[b])?g.defaultVertexStyle:g.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,null)),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,null)),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),g.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,
a.font||mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),g.getModel().isVertex(c[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,
null))));g.getModel().setStyle(c[b],d)}}finally{g.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?
@@ -7843,13 +7867,13 @@ function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("ti
this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var g=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if(null!=b){if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,
b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}if("undefined"!=typeof mxTableLayout&&"tableLayout"==b.childLayout)return c=new mxTableLayout(this.graph),c.rows=b.tableRows||2,c.columns=b.tableColumns||2,c.colPercentages=b.colPercentages,c.rowPercentages=b.rowPercentages,c.equalColumns="1"==mxUtils.getValue(b,"equalColumns",c.colPercentages?"0":"1"),
c.equalRows="1"==mxUtils.getValue(b,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),c.border=b.tableBorder||c.border,c.marginLeft=b.marginLeft||0,c.marginRight=b.marginRight||0,c.marginTop=b.marginTop||0,c.marginBottom=b.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),c.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=b.colWidths||"100",c.rowHeights=b.rowHeights||"50",c}return g.apply(this,arguments)}};
-var t=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return t.apply(this,arguments)&&!mxClient.IS_SF};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=u.apply(this,arguments);if(null==b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(z){null!=window.console&&console.log("Error in vars URL parameter: "+z)}null!=this.globalUrlVars&&(b=
+var t=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return t.apply(this,arguments)&&!mxClient.IS_SF};var v=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=v.apply(this,arguments);if(null==b){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(z){null!=window.console&&console.log("Error in vars URL parameter: "+z)}null!=this.globalUrlVars&&(b=
this.globalUrlVars[a])}return b};var w=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){w.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var y=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=
function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++)if(null!=a.actions[b].open)if(this.isCustomLink(a.actions[b].open)){if(!this.customLinkClicked(a.actions[b].open))return}else this.openLink(a.actions[b].open);this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)this.handleLinkAction(a.actions[b])}finally{this.model.endUpdate()}}};
Graph.prototype.handleLinkAction=function(a){var b=[];null!=a.select&&this.isEnabled()&&(b=this.getCellsForAction(a.select),this.setSelectionCells(b));null!=a.highlight&&(b=this.getCellsForAction(a.highlight),this.highlightCells(b,a.highlight.color,a.highlight.duration,a.highlight.opacity));null!=a.toggle&&this.toggleCells(this.getCellsForAction(a.toggle));null!=a.show&&this.setCellsVisible(this.getCellsForAction(a.show),!0);null!=a.hide&&this.setCellsVisible(this.getCellsForAction(a.hide),!1);null!=
a.scroll&&(b=this.getCellsForAction(a.scroll));0<b.length&&this.scrollCellToVisible(b[0])};Graph.prototype.getCellsForAction=function(a){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++)if("*"==a[c])var g=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=g},g));else{var d=this.model.getCell(a[c]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=
-function(a,b,c){var g=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var d=0;d<b.length;d++)if(this.model.isVertex(b[d])||this.model.isEdge(b[d])){var l=null!=b[d].value&&"object"==typeof b[d].value?mxUtils.trim(b[d].value.getAttribute(c)||""):"",n=!0;if(0<l.length)for(var l=l.toLowerCase().split(" "),f=0;f<a.length&&n;f++)var v=mxUtils.trim(a[f]).toLowerCase(),n=n&&(0==v.length||0<=mxUtils.indexOf(l,v));else n=0==a.length;n&&g.push(b[d])}}return g};
+function(a,b,c){var g=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());c=null!=c?c:"tags";for(var d=0;d<b.length;d++)if(this.model.isVertex(b[d])||this.model.isEdge(b[d])){var l=null!=b[d].value&&"object"==typeof b[d].value?mxUtils.trim(b[d].value.getAttribute(c)||""):"",n=!0;if(0<l.length)for(var l=l.toLowerCase().split(" "),f=0;f<a.length&&n;f++)var h=mxUtils.trim(a[f]).toLowerCase(),n=n&&(0==h.length||0<=mxUtils.indexOf(l,h));else n=0==a.length;n&&g.push(b[d])}}return g};
Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,c,g){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,c,g)};Graph.prototype.highlightCell=function(a,b,
c,g){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),l=new mxCellHighlight(this,b,d,!1);null!=g&&(l.opacity=g);l.highlight(a);window.setTimeout(function(){null!=l.shape&&(mxUtils.setPrefixedStyle(l.shape.node.style,"transition","all 1200ms ease-in-out"),l.shape.node.style.opacity=0);window.setTimeout(function(){l.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,
b,c){c=null!=c?c:!1;var g=a.ownerDocument,d=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"filter"):g.createElement("filter");d.setAttribute("id",this.shadowId);var l=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):g.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",this.svgShadowBlur);l.setAttribute("result","blur");d.appendChild(l);l=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feOffset"):
@@ -7865,29 +7889,29 @@ mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarku
mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];
mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",
STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,
-5)&&(b="mxgraph.sysml"));return b};var v=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,g,d,l,n,f,h,q){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);null!=t&&mxStencilRegistry.getStencil(t)}return v.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){x.value=Math.max(1,Math.min(f,Math.max(parseInt(x.value),parseInt(k.value))));k.value=Math.max(1,Math.min(f,Math.min(parseInt(x.value),parseInt(k.value))))}function g(b){function c(b,c,d){var l=
-b.getGraphBounds(),n=0,f=0,h=W.get(),v=1/b.pageScale,q=p.checked;if(q)var v=parseInt(K.value),t=parseInt(da.value),v=Math.min(h.height*t/(l.height/b.view.scale),h.width*v/(l.width/b.view.scale));else v=parseInt(m.value)/(100*b.pageScale),isNaN(v)&&(g=1/b.pageScale,m.value="100 %");h=mxRectangle.fromRectangle(h);h.width=Math.ceil(h.width*g);h.height=Math.ceil(h.height*g);v*=g;!q&&b.pageVisible?(l=b.getPageLayout(),n-=l.x*h.width,f-=l.y*h.height):q=!0;if(null==c){c=PrintDialog.createPrintPreview(b,
-v,h,0,n,f,q);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var k=c.writeHead;c.writeHead=function(b){k.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var u=c.renderPage;c.renderPage=function(a,b,c,g,d,l){var n=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var f=u.apply(this,
-arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:f.className="geDisableMathJax";return f}}c.open(null,null,d,!0)}else{h=b.background;if(null==h||""==h||h==mxConstants.NONE)h="#ffffff";c.backgroundColor=h;c.autoOrigin=q;c.appendGraph(b,v,n,f,d,!0)}return c}var g=parseInt(ea.value)/100;isNaN(g)&&(g=1,ea.value="100 %");var g=.75*g,l=k.value,n=x.value,f=!q.checked,h=null;f&&(f=l==v&&n==v);if(!f&&null!=a.pages&&a.pages.length){var t=0,f=a.pages.length-1;q.checked||
-(t=parseInt(l)-1,f=parseInt(n)-1);for(var u=t;u<=f;u++){var w=a.pages[u],l=w==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.getStylesheet()),n=!0,t=!1,y=null,E=null;null==w.viewState&&null==w.root&&a.updatePageRoot(w);null!=w.viewState&&(n=w.viewState.pageVisible,t=w.viewState.mathEnabled,y=w.viewState.background,E=w.viewState.backgroundImage);l.background=y;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=n;l.mathEnabled=t;var F=l.getGlobalVariable;
-l.getGlobalVariable=function(a){return"page"==a?w.getName():"pagenumber"==a?u+1:F.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(w);l.model.setRoot(w.root)}h=c(l,h,u!=f);l!=d&&l.container.parentNode.removeChild(l.container)}}else h=c(d);h.mathEnabled&&(f=h.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln("showMathMenu: false,"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
+5)&&(b="mxgraph.sysml"));return b};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,g,d,l,n,f,h,q){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);null!=t&&mxStencilRegistry.getStencil(t)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){x.value=Math.max(1,Math.min(f,Math.max(parseInt(x.value),parseInt(k.value))));k.value=Math.max(1,Math.min(f,Math.min(parseInt(x.value),parseInt(k.value))))}function g(b){function c(b,c,d){var l=
+b.getGraphBounds(),n=0,f=0,u=W.get(),h=1/b.pageScale,q=p.checked;if(q)var h=parseInt(K.value),t=parseInt(da.value),h=Math.min(u.height*t/(l.height/b.view.scale),u.width*h/(l.width/b.view.scale));else h=parseInt(m.value)/(100*b.pageScale),isNaN(h)&&(g=1/b.pageScale,m.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*g);u.height=Math.ceil(u.height*g);h*=g;!q&&b.pageVisible?(l=b.getPageLayout(),n-=l.x*u.width,f-=l.y*u.height):q=!0;if(null==c){c=PrintDialog.createPrintPreview(b,
+h,u,0,n,f,q);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var k=c.writeHead;c.writeHead=function(b){k.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=c.renderPage;c.renderPage=function(a,b,c,g,d,l){var n=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var f=v.apply(this,
+arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:f.className="geDisableMathJax";return f}}c.open(null,null,d,!0)}else{u=b.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";c.backgroundColor=u;c.autoOrigin=q;c.appendGraph(b,h,n,f,d,!0)}return c}var g=parseInt(ea.value)/100;isNaN(g)&&(g=1,ea.value="100 %");var g=.75*g,l=k.value,n=x.value,f=!q.checked,u=null;f&&(f=l==h&&n==h);if(!f&&null!=a.pages&&a.pages.length){var t=0,f=a.pages.length-1;q.checked||
+(t=parseInt(l)-1,f=parseInt(n)-1);for(var v=t;v<=f;v++){var w=a.pages[v],l=w==a.currentPage?d:null;if(null==l){var l=a.createTemporaryGraph(d.getStylesheet()),n=!0,t=!1,y=null,E=null;null==w.viewState&&null==w.root&&a.updatePageRoot(w);null!=w.viewState&&(n=w.viewState.pageVisible,t=w.viewState.mathEnabled,y=w.viewState.background,E=w.viewState.backgroundImage);l.background=y;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=n;l.mathEnabled=t;var F=l.getGlobalVariable;
+l.getGlobalVariable=function(a){return"page"==a?w.getName():"pagenumber"==a?v+1:F.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(w);l.model.setRoot(w.root)}u=c(l,u,v!=f);l!=d&&l.container.parentNode.removeChild(l.container)}}else u=c(d);u.mathEnabled&&(f=u.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln("showMathMenu: false,"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),f.writeln('"HTML-CSS": {'),f.writeln("imageFont: null"),f.writeln("},"),f.writeln("TeX: {"),f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),b&&(f.writeln("MathJax.Hub.Queue(function () {"),
-f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),f.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));h.closeDocument();!h.mathEnabled&&b&&PrintDialog.printPreview(h)}var d=a.editor.graph,l=document.createElement("div"),n=document.createElement("h3");n.style.width="100%";n.style.textAlign="center";n.style.marginTop="0px";mxUtils.write(n,b||mxResources.get("print"));l.appendChild(n);var f=1,v=1,h=document.createElement("div");
-h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");h.appendChild(q);n=document.createElement("span");mxUtils.write(n,mxResources.get("printAllPages"));h.appendChild(n);mxUtils.br(h);var t=q.cloneNode(!0);q.setAttribute("checked","checked");t.setAttribute("value","range");
-h.appendChild(t);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+":");h.appendChild(n);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";h.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("to"));h.appendChild(n);var x=k.cloneNode(!0);h.appendChild(x);mxEvent.addListener(k,"focus",function(){t.checked=!0});mxEvent.addListener(x,
-"focus",function(){t.checked=!0});mxEvent.addListener(k,"change",c);mxEvent.addListener(x,"change",c);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(n=0;n<a.pages.length;n++)if(a.currentPage==a.pages[n]){v=n+1;k.value=v;x.value=v;break}k.setAttribute("max",f);x.setAttribute("max",f);1<f&&l.appendChild(h);var u=document.createElement("div");u.style.marginBottom="10px";var w=document.createElement("input");w.style.marginRight="8px";w.setAttribute("value","adjust");w.setAttribute("type",
-"radio");w.setAttribute("name","printZoom");u.appendChild(w);n=document.createElement("span");mxUtils.write(n,mxResources.get("adjustTo"));u.appendChild(n);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","100 %");m.style.width="50px";u.appendChild(m);mxEvent.addListener(m,"focus",function(){w.checked=!0});l.appendChild(u);var h=h.cloneNode(!1),p=w.cloneNode(!0);p.setAttribute("value","fit");w.setAttribute("checked","checked");n=document.createElement("div");
-n.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";n.appendChild(p);h.appendChild(n);u=document.createElement("table");u.style.display="inline-block";var y=document.createElement("tbody"),E=document.createElement("tr"),F=E.cloneNode(!0),N=document.createElement("td"),X=N.cloneNode(!0),P=N.cloneNode(!0),U=N.cloneNode(!0),S=N.cloneNode(!0),ba=N.cloneNode(!0);N.style.textAlign="right";U.style.textAlign="right";mxUtils.write(N,mxResources.get("fitTo"));var K=document.createElement("input");
+f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),f.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));u.closeDocument();!u.mathEnabled&&b&&PrintDialog.printPreview(u)}var d=a.editor.graph,l=document.createElement("div"),n=document.createElement("h3");n.style.width="100%";n.style.textAlign="center";n.style.marginTop="0px";mxUtils.write(n,b||mxResources.get("print"));l.appendChild(n);var f=1,h=1,u=document.createElement("div");
+u.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");u.appendChild(q);n=document.createElement("span");mxUtils.write(n,mxResources.get("printAllPages"));u.appendChild(n);mxUtils.br(u);var t=q.cloneNode(!0);q.setAttribute("checked","checked");t.setAttribute("value","range");
+u.appendChild(t);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+":");u.appendChild(n);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";u.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("to"));u.appendChild(n);var x=k.cloneNode(!0);u.appendChild(x);mxEvent.addListener(k,"focus",function(){t.checked=!0});mxEvent.addListener(x,
+"focus",function(){t.checked=!0});mxEvent.addListener(k,"change",c);mxEvent.addListener(x,"change",c);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(n=0;n<a.pages.length;n++)if(a.currentPage==a.pages[n]){h=n+1;k.value=h;x.value=h;break}k.setAttribute("max",f);x.setAttribute("max",f);1<f&&l.appendChild(u);var v=document.createElement("div");v.style.marginBottom="10px";var w=document.createElement("input");w.style.marginRight="8px";w.setAttribute("value","adjust");w.setAttribute("type",
+"radio");w.setAttribute("name","printZoom");v.appendChild(w);n=document.createElement("span");mxUtils.write(n,mxResources.get("adjustTo"));v.appendChild(n);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","100 %");m.style.width="50px";v.appendChild(m);mxEvent.addListener(m,"focus",function(){w.checked=!0});l.appendChild(v);var u=u.cloneNode(!1),p=w.cloneNode(!0);p.setAttribute("value","fit");w.setAttribute("checked","checked");n=document.createElement("div");
+n.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";n.appendChild(p);u.appendChild(n);v=document.createElement("table");v.style.display="inline-block";var y=document.createElement("tbody"),E=document.createElement("tr"),F=E.cloneNode(!0),N=document.createElement("td"),X=N.cloneNode(!0),P=N.cloneNode(!0),U=N.cloneNode(!0),S=N.cloneNode(!0),ba=N.cloneNode(!0);N.style.textAlign="right";U.style.textAlign="right";mxUtils.write(N,mxResources.get("fitTo"));var K=document.createElement("input");
K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";X.appendChild(K);n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsAcross"));P.appendChild(n);mxUtils.write(U,mxResources.get("fitToBy"));var da=K.cloneNode(!0);S.appendChild(da);mxEvent.addListener(K,"focus",function(){p.checked=!0});mxEvent.addListener(da,"focus",function(){p.checked=!0});n=document.createElement("span");mxUtils.write(n,
-mxResources.get("fitToSheetsDown"));ba.appendChild(n);E.appendChild(N);E.appendChild(X);E.appendChild(P);F.appendChild(U);F.appendChild(S);F.appendChild(ba);y.appendChild(E);y.appendChild(F);u.appendChild(y);h.appendChild(u);l.appendChild(h);h=document.createElement("div");n=document.createElement("div");n.style.fontWeight="bold";n.style.marginBottom="12px";mxUtils.write(n,mxResources.get("paperSize"));h.appendChild(n);n=document.createElement("div");n.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(n,
-"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);h.appendChild(n);n=document.createElement("span");mxUtils.write(n,mxResources.get("pageScale"));h.appendChild(n);var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","100 %");ea.style.width="60px";h.appendChild(ea);l.appendChild(h);n=document.createElement("div");n.style.cssText="text-align:right;margin:48px 0 0 0;";h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-h.className="geBtn";a.editor.cancelFirst&&n.appendChild(h);a.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),u.className="geBtn",n.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();g(!1)}),u.className="geBtn",n.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();g(!0)});u.className=
-"geBtn gePrimaryBtn";n.appendChild(u);a.editor.cancelFirst||n.appendChild(h);l.appendChild(n);this.container=l};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=
+mxResources.get("fitToSheetsDown"));ba.appendChild(n);E.appendChild(N);E.appendChild(X);E.appendChild(P);F.appendChild(U);F.appendChild(S);F.appendChild(ba);y.appendChild(E);y.appendChild(F);v.appendChild(y);u.appendChild(v);l.appendChild(u);u=document.createElement("div");n=document.createElement("div");n.style.fontWeight="bold";n.style.marginBottom="12px";mxUtils.write(n,mxResources.get("paperSize"));u.appendChild(n);n=document.createElement("div");n.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(n,
+"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);u.appendChild(n);n=document.createElement("span");mxUtils.write(n,mxResources.get("pageScale"));u.appendChild(n);var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","100 %");ea.style.width="60px";u.appendChild(ea);l.appendChild(u);n=document.createElement("div");n.style.cssText="text-align:right;margin:48px 0 0 0;";u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+u.className="geBtn";a.editor.cancelFirst&&n.appendChild(u);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",n.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();g(!1)}),v.className="geBtn",n.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();g(!0)});v.className=
+"geBtn gePrimaryBtn";n.appendChild(v);a.editor.cancelFirst||n.appendChild(u);l.appendChild(n);this.container=l};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=
this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(x.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
var ErrorDialog=function(a,c,b,d,f,h,k,m,p,g,l){p=null!=p?p:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,c);q.setAttribute("title",c);n.appendChild(q)}c=
document.createElement("div");c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=h&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();h()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=l&&l()}),g.className="geBtn",b.appendChild(g));var t=mxUtils.button(d,function(){p&&a.hideDialog();null!=f&&f()});t.className="geBtn";b.appendChild(t);
null!=k&&(d=mxUtils.button(k,function(){p&&a.hideDialog();null!=m&&m()}),d.className="geBtn gePrimaryBtn",b.appendChild(d));this.init=function(){t.focus()};n.appendChild(b);this.container=n};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.0.43";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,f){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,f);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.1.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,f){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,f);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var g=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",l=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=l+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(n){}};EditorUi.sendReport=function(a,
b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(n){}};EditorUi.debug=function(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
@@ -7895,7 +7919,7 @@ a)}};EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.enablePlantUml=Ed
EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,
10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=
!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");
-EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(u){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=
+EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(v){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=
null!==d.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();
this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=
c?c:24;var g=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=g.spin;g.spin=function(c,l){var n=!1;this.active||(d.call(this,c),this.active=!0,null!=l&&(n=document.createElement("div"),n.style.position="absolute",n.style.whiteSpace="nowrap",n.style.background="#4B4243",n.style.color="white",n.style.fontFamily="Helvetica, Arial",n.style.fontSize="9pt",n.style.padding="6px",
@@ -7906,18 +7930,18 @@ c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getEl
h=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=h?mxUtils.getXml(h):""}catch(w){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=this.editor.graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,g=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<g.length||1==g.length&&g[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var d=g.length-1;0<=d;d--){var f=this.updatePageRoot(new DiagramPage(g[d]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[d+1]));
b.model.execute(new ChangePage(this,f,0==d?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(d=0;d<c.length;d++)b.model.execute(new ChangePage(this,
-c[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,f,h,k,m,v,x){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;v=null!=v?v:!0;var g,l=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?g="_blank":l=g=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){var q=b.zapGremlins(mxUtils.getXml(a)),n=b.compress(q);if(b.decompress(n)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,
+c[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,f,h,k,m,u,x){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;u=null!=u?u:!0;var g,l=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?g="_blank":l=g=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){var q=b.zapGremlins(mxUtils.getXml(a)),n=b.compress(q);if(b.decompress(n)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,
n);n=a.ownerDocument.createElement("mxfile");n.appendChild(q)}x?(n=n.cloneNode(!0),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type"),n.setAttribute("modified",(new Date).toISOString()),n.setAttribute("host",window.location.hostname),n.setAttribute("agent",navigator.userAgent),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("etag",
-Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a));a=mxUtils.getXml(n);if(!h&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(n),b,null!=c?c.getTitle():null,g,l);else if(h||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,m,v,l);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);
+Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a));a=mxUtils.getXml(n);if(!h&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(n),b,null!=c?c.getTitle():null,g,l);else if(h||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,m,u,l);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);
if(a&&null!=this.fileNode&&null!=this.currentPage)if(c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.currentPage.node,c),c=this.fileNode.cloneNode(!1),b)c.appendChild(this.currentPage.node);else for(var g=0;g<this.pages.length;g++){if(this.currentPage!=this.pages[g]&&this.pages[g].needsUpdate){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[g].root));this.editor.graph.saveViewState(this.pages[g].viewState,
d);mxUtils.setTextContent(this.pages[g].node,this.editor.graph.compressNode(d));delete this.pages[g].needsUpdate}c.appendChild(this.pages[g].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],g=0;g<a.length;g++){var d=a.charAt(g);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?
-c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(u){a[EditorUi.DIFF_INSERT][b].data=u.message}if(null!=
+c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(v){a[EditorUi.DIFF_INSERT][b].data=v.message}if(null!=
a[EditorUi.DIFF_UPDATE]){for(var g in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][g];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"),null!=b[c].style&&(b[c].style="["+b[c].style.length+"]"),null!=b[c].geometry&&(b[c].geometry="["+b[c].geometry.length+"]"),0==Object.keys(b[c]).length&&delete b[c];0==Object.keys(b).length&&delete d.cells[a]}}),
b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(d.cells).length&&delete d.cells);0==Object.keys(d).length&&delete a[EditorUi.DIFF_UPDATE][g]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<
a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),g=0;g<c.length;g++)null!=c[g].getAttribute("value")&&c[g].setAttribute("value","["+c[g].getAttribute("value").length+"]"),null!=c[g].getAttribute("style")&&c[g].setAttribute("style","["+c[g].getAttribute("style").length+"]"),null!=c[g].parentNode&&"root"!=c[g].parentNode.nodeName&&null!=c[g].parentNode.parentNode&&(c[g].setAttribute("id",c[g].parentNode.getAttribute("id")),
c[g].parentNode.parentNode.replaceChild(c[g],c[g].parentNode));c=a.getElementsByTagName("mxGeometry");for(g=0;g<c.length;g++)this.anonymizeAttributes(c[g],b);return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,
-function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,f,h,k,m,v){f=null!=f?f:!0;k=null!=k?k:this.getXmlFileData(f,null!=h?h:!1);v=null!=v?v:this.getCurrentFile();h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&
-(b||!a&&null!=v&&/(\.svg)$/i.test(v.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var g=h.getGlobalVariable,l=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(l.root)}a=this.createFileData(k,h,v,window.location.href,a,b,c,d,f,m);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,h){h=null!=
+function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,f,h,k,m,u){f=null!=f?f:!0;k=null!=k?k:this.getXmlFileData(f,null!=h?h:!1);u=null!=u?u:this.getCurrentFile();h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&
+(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var g=h.getGlobalVariable,l=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(l.root)}a=this.createFileData(k,h,u,window.location.href,a,b,c,d,f,m);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,h){h=null!=
h?h:!0;var g=null,l="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=h?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),n=b.view.scale;h=Math.floor(g.x/n-b.view.translate.x);n=Math.floor(g.y/n-b.view.translate.y);g=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(l="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",n)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit",
"0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==
f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=g&&g!=mxConstants.NONE?' style="background-color:'+g+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+l+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
@@ -7929,22 +7953,22 @@ b=b[0].getElementsByTagName("div"),0<b.length&&(a=mxUtils.getTextContent(b[0])),
EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,
b,c,d,f,h,k){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=this.getBaseFilename(!f),l=g+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,f));this.saveData(l,a,n,"text/xml")}else if("html"==a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(l,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?l=
g+".png":"jpeg"==a&&(l=g+".jpg"),this.saveRequest(l,a,mxUtils.bind(this,function(b,c){try{var g=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var l=this.createDownloadRequest(b,a,d,c,k,f);this.editor.graph.pageVisible=g;return l}catch(C){this.handleError(C)}}));else{var q=null,t=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(q)}))});if("svg"==a){var u=this.editor.graph.background;if(k||u==mxConstants.NONE)u=null;var m=this.editor.graph.getSvg(u,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(m);this.convertImages(m,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();t('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else l=g+".svg",q=this.getFileData(!1,
+function(){mxUtils.popup(q)}))});if("svg"==a){var m=this.editor.graph.background;if(k||m==mxConstants.NONE)m=null;var v=this.editor.graph.getSvg(m,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(v);this.convertImages(v,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();t('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else l=g+".svg",q=this.getFileData(!1,
!0,null,mxUtils.bind(this,function(a){this.spinner.stop();t(a)}),d)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,f,h){var g=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==h?!1:"xmlpng"!=b);var l="",n="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};g="0";"pdf"==b&&0==h&&(n="&allPages=1");if("xmlpng"==b&&(g="1",b="png",null!=this.pages&&null!=this.currentPage))for(h=
0;h<this.pages.length;h++)if(this.pages[h]==this.currentPage){l="&from="+h;break}h=this.editor.graph.background;"png"==b&&f&&(h=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+l+n+"&bg="+(null!=h?h:mxConstants.NONE)+"&base64="+d+"&embedXml="+g+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,g=mxUtils.bind(this,function(c){var g=
null!=a.data?a.data:"";null!=c&&0<c.length&&(0<g.length&&(g+="\n"),g+=c);c=new LocalFile(this,"csv"!=a.format&&0<g.length?g:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(g,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var l=null!=a.interval?parseInt(a.interval):6E4,f=null,
n=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),h()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),h=mxUtils.bind(this,function(){window.clearTimeout(f);f=window.setTimeout(n,l)});this.editor.addListener("pageSelected",
mxUtils.bind(this,function(){h();n()}));h();n()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var l=a.url;/^https?:\/\//.test(l)&&!this.isCorsEnabledForUrl(l)&&(l=PROXY_URL+"?url="+encodeURIComponent(l));this.loadUrl(l,mxUtils.bind(this,function(a){g(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else g("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||g.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){d.alert(a.tooltip)});
-return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var g=this.editor.graph,f=g.getModel();f.beginUpdate();var h=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=f.getCell(a.getAttribute("id"));if(null!=k){try{var v=a.getAttribute("value");if(null!=v){var x=mxUtils.parseXml(v).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(k,x);else for(var m=x.attributes,p=0;p<
+return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var g=this.editor.graph,f=g.getModel();f.beginUpdate();var h=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=f.getCell(a.getAttribute("id"));if(null!=k){try{var u=a.getAttribute("value");if(null!=u){var x=mxUtils.parseXml(u).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(k,x);else for(var m=x.attributes,p=0;p<
m.length;p++)g.setAttributeForCell(k,m[p].nodeName,0<m[p].nodeValue.length?m[p].nodeValue:null)}}catch(D){null!=window.console&&console.log("Error in value for "+k.id+": "+D)}try{var z=a.getAttribute("style");null!=z&&g.model.setStyle(k,z)}catch(D){null!=window.console&&console.log("Error in style for "+k.id+": "+D)}try{var A=a.getAttribute("icon");if(null!=A){var G=0<A.length?JSON.parse(A):null;null!=G&&G.append||g.removeCellOverlays(k);null!=G&&g.addCellOverlay(k,b(G))}}catch(D){null!=window.console&&
console.log("Error in icon for "+k.id+": "+D)}try{var B=a.getAttribute("geometry");if(null!=B){var B=JSON.parse(B),H=g.getCellGeometry(k);if(null!=H){H=H.clone();for(key in B){var J=parseFloat(B[key]);"dx"==key?H.x+=J:"dy"==key?H.y+=J:"dw"==key?H.width+=J:"dh"==key?H.height+=J:H[key]=parseFloat(B[key])}g.model.setGeometry(k,H)}}}catch(D){null!=window.console&&console.log("Error in icon for "+k.id+": "+D)}}}else if("model"==a.nodeName){for(var C=a.firstChild;null!=C&&C.nodeType!=mxConstants.NODETYPE_ELEMENT;)C=
C.nextSibling;null!=C&&(new mxCodec(a.firstChild)).decode(C,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(g.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(h=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=h&&this.chromelessResize&&this.chromelessResize(!0,
-h)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",g=c.lastIndexOf(".");0<=g&&(d=c.substring(g),c=c.substring(0,g));if(b)var l=new Date,g=l.getFullYear(),f=l.getMonth()+1,h=l.getDate(),v=l.getHours(),k=l.getMinutes(),l=l.getSeconds(),c=c+(" "+(g+"-"+f+"-"+h+"-"+v+"-"+k+"-"+l));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);
+h)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",g=c.lastIndexOf(".");0<=g&&(d=c.substring(g),c=c.substring(0,g));if(b)var l=new Date,g=l.getFullYear(),f=l.getMonth()+1,h=l.getDate(),u=l.getHours(),k=l.getMinutes(),l=l.getSeconds(),c=c+(" "+(g+"-"+f+"-"+h+"-"+u+"-"+k+"-"+l));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);
var c=!1;this.hideDialog();null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display=
"none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+
"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&
window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:"File",action:"open",label:a.getMode()+"."+a.getSize()});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
-1),mxSettings.save()}catch(t){}}catch(t){this.fileLoadedError=t;null!=window.console&&console.log("error in fileLoaded:",a,t);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(u){}this.handleError(t,
+1),mxSettings.save()}catch(t){}}catch(t){this.fileLoadedError=t;null!=window.console&&console.log("error in fileLoaded:",a,t);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(v){}this.handleError(t,
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()}),!0)}else d();return c};EditorUi.prototype.isActive=function(){return this.editor.graph.isEditing()||this.editor.graph.isMouseDown||null!=this.dialog};EditorUi.prototype.runWhenIdle=function(a){if(this.isActive()){var b=mxUtils.bind(this,function(){this.isActive()||(this.editor.graph.removeMouseListener(c),
this.editor.removeListener("hideDialog",b),this.editor.graph.removeListener(b),null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a())}),c={mouseDown:function(){},mouseMove:function(){},mouseUp:b};this.editor.graph.addListener(mxEvent.EDITING_STOPPED,b);this.editor.graph.addListener(mxEvent.ESCAPE,b);this.editor.graph.addMouseListener(c);this.editor.addListener("hideDialog",b)}else null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a()};EditorUi.prototype.getHashValueForPages=
function(a,b){var c=0,d=new mxGraphModel,g=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var l=0;l<a.length;l++){this.updatePageRoot(a[l]);var f=a[l].node.cloneNode(!1);f.removeAttribute("name");d.root=a[l].root;var h=g.encode(d);this.editor.graph.saveViewState(a[l].viewState,h,!0);h.removeAttribute("pageWidth");h.removeAttribute("pageHeight");f.appendChild(h);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);
@@ -7956,22 +7980,22 @@ if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete
if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],
d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=null,f=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign="center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g)):this.addLibraryEntries(b,c)});if(null!=this.sidebar&&null!=b)for(var l=
0;l<b.length;l++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));
-return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[l]);c=null!=c&&0<c.length?c:a.getTitle();var h=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var n=h.parentNode.previousSibling;c=n.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&n.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top=
-"0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");n.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.margin="0 3px";var p=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=
-mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var z=this.editor.graph,A=null,G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),h,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=m.cloneNode(!1),
-A.setAttribute("src",Editor.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",A.style.marginRight="2px",A.style.marginTop="-2px",k.insertBefore(A,k.firstChild),n.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),n.style.paddingRight=18*k.childNodes.length+"px")})):null==p&&(p=m.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",
-mxResources.get("save")),k.insertBefore(p,k.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==p||a.isModified()||(n.style.paddingRight=18*k.childNodes.length+"px",p.parentNode.removeChild(p),p=null)});mxEvent.consume(c)})),n.style.paddingRight=18*k.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var l=
-0;l<a.length;l++){var n=z.getCellGeometry(a[l]);null!=n&&n.translate(-c.x,-c.y)}h.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);B(d);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),J=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),
-z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=z.getSelectionCells(),c=z.view.getBounds(b),d=z.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=z.view.translate.x;c.y-=z.view.translate.y;H(b,c)}mxEvent.consume(a)});h.style.border="3px solid transparent";mxEvent.addGestureListeners(h,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility=
-"hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)",h.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!1),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(h.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),
-h.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(h,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",h.style.border="3px solid transparent",h.style.cursor="",z.autoScroll=!0,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!0),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility=
-"visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(h,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";h.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"drop",mxUtils.bind(this,function(a){h.style.border="3px solid transparent";h.style.cursor="";null!=g&&(g.style.border=
-"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,l,n,v,k,q,m,t){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,v,k),c)],c[0].vertex=!0,H(c,new mxRectangle(0,0,v,k),a,mxEvent.isAltDown(a)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&
-0<b.length&&(g.parentNode.removeChild(g),g=null);else{var x=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(l.documentElement));f(n,h);b=b.concat(n);B(a);this.spinner.stop();x=!0}catch(K){}else if("mxfile"==l.documentElement.nodeName)try{for(var v=l.documentElement.getElementsByTagName("diagram"),l=0;l<v.length;l++){var n=mxUtils.getTextContent(v[l]),k=this.stringToCells(this.editor.graph.decompress(n)),
-q=this.editor.graph.getBoundingBoxFromGeometry(k);H(k,new mxRectangle(0,0,q.width,q.height),a)}x=!0}catch(K){null!=window.console&&console.log("error in drop handler:",K)}}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=t&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(t,function(a){u(a,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(c,q)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(h.style.border="3px solid transparent",
-h.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,k.firstChild);mxEvent.addListener(m,"click",G);mxEvent.addListener(h,"dblclick",function(a){mxEvent.getSource(a)==h&&G(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));k.insertBefore(c,k.firstChild);mxEvent.addListener(c,"click",J);this.isOffline()||".scratchpad"!=
-a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),k.insertBefore(c,k.firstChild))}n.appendChild(k);n.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=
+return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[l]);c=null!=c&&0<c.length?c:a.getTitle();var n=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var h=n.parentNode.previousSibling;c=h.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&h.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top=
+"0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");h.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.margin="0 3px";var p=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=
+mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var z=this.editor.graph,A=null,G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),n,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=m.cloneNode(!1),
+A.setAttribute("src",Editor.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",A.style.marginRight="2px",A.style.marginTop="-2px",k.insertBefore(A,k.firstChild),h.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),h.style.paddingRight=18*k.childNodes.length+"px")})):null==p&&(p=m.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",
+mxResources.get("save")),k.insertBefore(p,k.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==p||a.isModified()||(h.style.paddingRight=18*k.childNodes.length+"px",p.parentNode.removeChild(p),p=null)});mxEvent.consume(c)})),h.style.paddingRight=18*k.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var l=
+0;l<a.length;l++){var h=z.getCellGeometry(a[l]);null!=h&&h.translate(-c.x,-c.y)}n.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);B(d);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),J=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),
+z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=z.getSelectionCells(),c=z.view.getBounds(b),d=z.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=z.view.translate.x;c.y-=z.view.translate.y;H(b,c)}mxEvent.consume(a)});n.style.border="3px solid transparent";mxEvent.addGestureListeners(n,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility=
+"hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)",n.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!1),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(n.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),
+n.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(n,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",n.style.border="3px solid transparent",n.style.cursor="",z.autoScroll=!0,null!=z.graphHandler.guide&&z.graphHandler.guide.setVisible(!0),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility=
+"visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";n.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"drop",mxUtils.bind(this,function(a){n.style.border="3px solid transparent";n.style.cursor="";null!=g&&(g.style.border=
+"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,l,h,u,k,q,m,x){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,u,k),c)],c[0].vertex=!0,H(c,new mxRectangle(0,0,u,k),a,mxEvent.isAltDown(a)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&
+0<b.length&&(g.parentNode.removeChild(g),g=null);else{var t=!1,v=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(l.documentElement));f(h,n);b=b.concat(h);B(a);this.spinner.stop();t=!0}catch(K){}else if("mxfile"==l.documentElement.nodeName)try{for(var u=l.documentElement.getElementsByTagName("diagram"),l=0;l<u.length;l++){var h=mxUtils.getTextContent(u[l]),k=this.stringToCells(this.editor.graph.decompress(h)),
+q=this.editor.graph.getBoundingBoxFromGeometry(k);H(k,new mxRectangle(0,0,q.width,q.height),a)}t=!0}catch(K){null!=window.console&&console.log("error in drop handler:",K)}}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=x&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(x,function(a){v(a,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,q)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?v(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):v(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(n.style.border="3px solid transparent",
+n.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,k.firstChild);mxEvent.addListener(m,"click",G);mxEvent.addListener(n,"dblclick",function(a){mxEvent.getSource(a)==n&&G(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));k.insertBefore(c,k.firstChild);mxEvent.addListener(c,"click",J);this.isOffline()||".scratchpad"!=
+a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),k.insertBefore(c,k.firstChild))}h.appendChild(k);h.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=
0;c<a.length;c++){var d=a[c],g=d.data;if(null!=g){var g=this.convertDataUri(g),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+g,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(g=this.stringToCells(this.editor.graph.decompress(d.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),
@@ -7983,14 +8007,14 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();
mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d){var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),h=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(l=mxResources.get("cancel"),h=function(){g();f.retry()}),404==f.code||404==f.status||403==f.code){a=403==
f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var n=window.location.hash;null!=n&&"#G"==n.substring(0,2)&&(n=n.substring(2),a+='<br><a href="https://drive.google.com/open?id='+n+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?a=mxUtils.htmlEntities(f.response.error):
-"undefined"!==window.App&&(f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,l,c,h,null,null,null,null,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,f,h,k,m,v,x,p,F,z){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,f,h,k,F,m,v);this.showDialog(a.container,x||340,p||(null!=b&&120<b.length?180:150),!0,!1,z);a.init()};EditorUi.prototype.alert=
+"undefined"!==window.App&&(f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,l,c,h,null,null,null,null,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,f,h,k,m,u,x,p,F,z){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,f,h,k,F,m,u);this.showDialog(a.container,x||340,p||(null!=b&&120<b.length?180:150),!0,!1,z);a.init()};EditorUi.prototype.alert=
function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,f,h){var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){g();null!=b&&b()},function(){g();null!=c&&c()},d,f);this.showDialog(a.container,340,90,!0,h);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=
function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,
"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,g=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(g,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&
!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,f){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,
b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else{var g=document.createElement("a"),l=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof g.download;if(mxClient.IS_GC)var h=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),l=65==(h?parseInt(h[2],10):!1)?!1:l;if(l||this.isOffline()){g.href=URL.createObjectURL(d?this.base64ToBlob(a,
-c):new Blob([a],{type:c}));l?g.download=b:g.setAttribute("target","_blank");document.body.appendChild(g);try{window.setTimeout(function(){URL.revokeObjectURL(g.href)},0),g.click(),g.parentNode.removeChild(g)}catch(v){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+
-encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,g=Math.ceil(d/1024),f=Array(g),l=0;l<g;++l){for(var h=1024*l,v=Math.min(h+1024,d),k=Array(v-h),m=0;h<v;++m,++h)k[m]=c[h].charCodeAt(0);f[l]=new Uint8Array(k)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,h,k){h=null!=h?h:!1;k=null!=k?k:"vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(h);b=new CreateDialog(this,
+c):new Blob([a],{type:c}));l?g.download=b:g.setAttribute("target","_blank");document.body.appendChild(g);try{window.setTimeout(function(){URL.revokeObjectURL(g.href)},0),g.click(),g.parentNode.removeChild(g)}catch(u){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+
+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,g=Math.ceil(d/1024),f=Array(g),l=0;l<g;++l){for(var h=1024*l,u=Math.min(h+1024,d),k=Array(u-h),m=0;h<u;++m,++h)k[m]=c[h].charCodeAt(0);f[l]=new Uint8Array(k)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,h,k){h=null!=h?h:!1;k=null!=k?k:"vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(h);b=new CreateDialog(this,
b,mxUtils.bind(this,function(b,g){try{if("_blank"==g)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,d);else g==App.MODE_DEVICE||"download"==g?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(g,mxUtils.bind(this,function(f){try{this.exportFile(a,b,c,d,g,f)}catch(F){this.handleError(F)}}))}catch(E){this.handleError(E)}}),
mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,k,null,1<f,4<f&&(!h||6>f)?3:4,a,c,d);this.showDialog(b.container,420,1==f?160:4<f?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+
b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);
@@ -8001,8 +8025,8 @@ a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChi
arguments)};EditorUi.prototype.saveData=function(a,b,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,a,d,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,g){return this.createEchoRequest(c,a,d,f,b,g)}),c,f,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,f,h,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var g=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,g){if("_blank"==g||null!=a&&0<a.length){var f=c("_blank"==g?null:a,g==App.MODE_DEVICE||"download"==
g||null==g||"_blank"==g?"0":"1");null!=f&&(g==App.MODE_DEVICE||"download"==g||"_blank"==g?f.simulate(document,"_blank"):this.pickFolder(g,mxUtils.bind(this,function(c){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,h,!0,g,c)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,g,c)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<g,4<g?3:4,d,h,f);this.showDialog(a.container,380,1==g?160:4<g?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,f,h){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,h,k,
-m,v,x){if(this.spinner.spin(document.body,mxResources.get("export"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var l=this.editor.graph.getSvg(g,a,k,m,null,c,null,null,"blank"==x?"_blank":"self"==x?"_top":null);d&&this.editor.graph.addSvgShadow(l,l);var n=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,
-null,null,c,v));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,"image/svg+xml"):
+m,u,x){if(this.spinner.spin(document.body,mxResources.get("export"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var l=this.editor.graph.getSvg(g,a,k,m,null,c,null,null,"blank"==x?"_blank":"self"==x?"_top":null);d&&this.editor.graph.addSvgShadow(l,l);var n=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,
+null,null,c,u));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,"image/svg+xml"):
this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,q,this.thumbImageCache)):q(l)}))}};EditorUi.prototype.addRadiobox=function(a,b,c,d,f,h,k){return this.addCheckbox(a,c,d,f,h,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,f,h,k,m){h=null!=h?h:!0;var g=document.createElement("input");
g.style.marginRight="8px";g.style.marginTop="16px";g.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();g.id=k;null!=m&&g.setAttribute("name",m);c&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d&&g.setAttribute("disabled","disabled");h&&(a.appendChild(g),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",k),a.appendChild(c),f||mxUtils.br(a));return g};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+
":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),g="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(g=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,
@@ -8012,8 +8036,8 @@ mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addLi
g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));d.appendChild(g);b&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(g));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();h.style.padding=
mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,f,h,k,m){var g=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+
a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&l.push("edit="+encodeURIComponent(f)),h&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));c&&(a=this.getSelectedPageIndex(),0<a&&l.push("page="+a));a=!0;null!=k?c="#U"+encodeURIComponent(k):(g=this.getCurrentFile(),m||null==g||g.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(c="#"+g.getHash(),a=!1));a&&null!=g&&null!=g.getTitle()&&g.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(g.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,h,k,m,v,x,p){this.getBasenames();var g={};""!=f&&f!=mxConstants.NONE&&(g.highlight=f);"auto"!==d&&(g.target=d);
-v||(g.lightbox=!1);g.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(g.zoom=c/100);c=[];k&&(c.push("pages"),g.resize=!0,null!=this.pages&&null!=this.currentPage&&(g.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),g.resize=!0);m&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),g.toolbar=c.join(" "));null!=x&&0<x.length&&(g.edit=x);null!=a?g.url=a:g.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(h?"max-width:100%;":
+(c="#"+g.getHash(),a=!1));a&&null!=g&&null!=g.getTitle()&&g.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(g.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,h,k,m,u,x,p){this.getBasenames();var g={};""!=f&&f!=mxConstants.NONE&&(g.highlight=f);"auto"!==d&&(g.target=d);
+u||(g.lightbox=!1);g.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(g.zoom=c/100);c=[];k&&(c.push("pages"),g.resize=!0,null!=this.pages&&null!=this.currentPage&&(g.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),g.resize=!0);m&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),g.toolbar=c.join(" "));null!=x&&0<x.length&&(g.edit=x);null!=a?g.url=a:g.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(h?"max-width:100%;":
"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(g))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";p(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var g=document.createElement("div");
g.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(f);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name",
"type-embedhtmldialog");f=l.cloneNode(!0);f.setAttribute("value","copy");h.appendChild(f);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(n);mxUtils.br(h);h.appendChild(l);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));h.appendChild(n);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(n=document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href",
@@ -8023,48 +8047,48 @@ C.setAttribute("disabled","disabled");C.checked&&H.checked?J.getEditSelect().rem
"nowrap";var l=document.createElement("h3");mxUtils.write(l,a||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(l);var n=this.getCurrentFile(),l="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=n&&n.constructor==window.DriveFile&&!b){a=80;var l="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var m=document.createElement("div");m.style.whiteSpace="normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));k.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(n.getId())}));m.style.marginTop="12px";m.className="geBtn";k.appendChild(m);g.appendChild(k);m=document.createElement("a");m.style.paddingLeft="12px";m.style.color="gray";m.style.fontSize="11px";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("check"));
k.appendChild(m);mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var q=null,p=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),q=document.createElement("input"),
-q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",g.appendChild(q),mxUtils.write(g,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=d+"px",g.appendChild(p),mxUtils.br(g);var t=this.addLinkSection(g,h);c=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==n||n.constructor!=window.DriveFile||b)u=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var B=this.addCheckbox(g,mxResources.get("lightbox"),!0),H=this.addEditButton(g,B),J=H.getEditInput(),C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=J.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(B,"change",function(){B.checked?(C.removeAttribute("disabled"),J.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),J.setAttribute("disabled",
-"disabled"));J.checked&&B.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){f(t.getTarget(),t.getColor(),null==u?!0:u.checked,B.checked,H.getLink(),C.checked,null!=q?q.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),l);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():
+q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",g.appendChild(q),mxUtils.write(g,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=d+"px",g.appendChild(p),mxUtils.br(g);var t=this.addLinkSection(g,h);c=null!=this.pages&&1<this.pages.length;var v=null;
+if(null==n||n.constructor!=window.DriveFile||b)v=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var B=this.addCheckbox(g,mxResources.get("lightbox"),!0),H=this.addEditButton(g,B),J=H.getEditInput(),C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=J.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(B,"change",function(){B.checked?(C.removeAttribute("disabled"),J.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),J.setAttribute("disabled",
+"disabled"));J.checked&&B.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){f(t.getTarget(),t.getColor(),null==v?!0:v.checked,B.checked,H.getLink(),C.checked,null!=q?q.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),l);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():
document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var g=document.createElement("div");g.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";g.appendChild(f);var h=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=d?null:this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),
!0),f=this.editor.graph,n=d?null:this.addCheckbox(g,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,g,mxUtils.bind(this,function(){c(!h.checked,null!=l?l.checked:!1,null!=n?n.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,f,h,k,m){k=null!=k?k:!0;var g=document.createElement("div");g.style.whiteSpace="nowrap";var l=
this.editor.graph,n="jpeg"==m?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(q);mxUtils.write(g,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";g.appendChild(p);mxUtils.write(g,mxResources.get("borderWidth")+":");
-var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder||"0";g.appendChild(t);mxUtils.br(g);var u=this.addCheckbox(g,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),w=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled",
+var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder||"0";g.appendChild(t);mxUtils.br(g);var v=this.addCheckbox(g,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),w=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled",
"disabled");y.setAttribute("type","checkbox");h&&(g.appendChild(y),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),n+=26,mxEvent.addListener(w,"change",function(){w.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));l.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var J=this.addCheckbox(g,mxResources.get("shadow"),l.shadowVisible),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type",
"checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(g.appendChild(C),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),n+=26);var D=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),I=null!=this.pages&&1<this.pages.length,M=this.addCheckbox(g,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=m);M.style.marginLeft="24px";M.style.marginBottom="16px";I||(M.style.display="none");mxEvent.addListener(D,"change",function(){D.checked&&
I?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")});k&&I||M.setAttribute("disabled","disabled");var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));L.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));L.appendChild(a);
-a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));L.appendChild(a);"svg"==m&&(mxUtils.write(g,mxResources.get("links")+":"),g.appendChild(L),mxUtils.br(g),mxUtils.br(g),n+=26);c=new CustomDialog(this,g,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=p.value;f(p.value,u.checked,!w.checked,J.checked,D.checked,C.checked,t.value,y.checked,!M.checked,L.value)}),null,c,d);this.showDialog(c.container,340,
+a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));L.appendChild(a);"svg"==m&&(mxUtils.write(g,mxResources.get("links")+":"),g.appendChild(L),mxUtils.br(g),mxUtils.br(g),n+=26);c=new CustomDialog(this,g,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=p.value;f(p.value,v.checked,!w.checked,J.checked,D.checked,C.checked,t.value,y.checked,!M.checked,L.value)}),null,c,d);this.showDialog(c.container,340,
n,!0,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=b){var l=document.createElement("h3");mxUtils.write(l,b);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";g.appendChild(l)}var n=this.addCheckbox(g,mxResources.get("fit"),
!0),k=this.addCheckbox(g,mxResources.get("shadow"),h.shadowVisible&&d,!d),m=this.addCheckbox(g,c),q=this.addCheckbox(g,mxResources.get("lightbox"),!0),p=this.addEditButton(g,q),t=p.getEditInput(),G=1<h.model.getChildCount(h.model.getRoot()),B=this.addCheckbox(g,mxResources.get("layers"),G,!G);B.style.marginLeft=t.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(G&&B.removeAttribute("disabled"),t.removeAttribute("disabled")):
(B.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&q.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){a(n.checked,k.checked,m.checked,q.checked,p.getLink(),B.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,h,k,m){function g(b){var g=" ",n="";d&&(g=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");var v="";c&&(v=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');k('<img src="'+b+'"'+v+(""!=n?' style="'+n+'"':"")+g+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");g(a)}),null,null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),
+(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");var u="";c&&(u=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');k('<img src="'+b+'"'+u+(""!=n?' style="'+n+'"':"")+g+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");g(a)}),null,null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var n="";c&&(n="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+n+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?g("data:image/png;base64,"+q.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,f,h,k){var g=this.editor.graph.getSvg(),l=g.getElementsByTagName("a");if(null!=l)for(var n=0;n<l.length;n++){var m=l[n].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==l[n].getAttribute("target")&&l[n].removeAttribute("target")}d&&g.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(g);if(c){var q=" ",p="";d&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(g,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+q+"/>")}))}else p="",d&&(g.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(g.getAttribute("width")),b=parseInt(g.getAttribute("height")),g.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",g.removeAttribute("height")),""!=p&&g.setAttribute("style",p),k(mxUtils.getXml(g))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+
" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,
function(){d()}))}),0)):d()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],g=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:g.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=
-this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,g=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),g=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),
+this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(v){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,g=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),g=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),
f=d.getGlobalVariable,h=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==g&&(g=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(g)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(x){null!=
b&&b(x)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,h,k){k=b.background;k==mxConstants.NONE&&(k=null);b=b.getSvg(k,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=f)this.convertImages(b,mxUtils.bind(this,function(a){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,f,h,k,m,v){v=null!=v?v:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,m):null,v)}catch(F){"Invalid image"==F.message?this.downloadFile(v):this.handleError(F)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,h,k)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
-"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,g={},f=mxUtils.bind(this,function(){if(0==d){for(var f=[c[0]],h=1;h<c.length;h++){var l=c[h].indexOf(")");f.push('url("');f.push(g[b(c[h].substring(0,l))]);f.push('"'+c[h].substring(l))}this.editor.resolvedFontCss=f.join("");a()}});if(0<c.length)for(var h=1;h<c.length;h++){var k=c[h].indexOf(")"),v=null,m=c[h].indexOf("format(",k);0<m&&(v=b(c[h].substring(m+7,c[h].indexOf(")",m))));mxUtils.bind(this,function(a){if(null==
-g[a]){g[a]=a;d++;var b="application/x-font-ttf";if("svg"==v||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==v||"embedded-opentype"==v||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==v||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==v||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==v||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==v||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=
-a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){g[a]=b;d--;f()}),mxUtils.bind(this,function(a){d--;f()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[h].substring(0,k)),v)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,h,k,m,v,p,E,F,z,A){h=null!=h?h:!0;F=null!=F?F:this.editor.graph;z=null!=z?z:0;var g=v?null:F.background;g==mxConstants.NONE&&(g=null);null==g&&(g=d);null==g&&0==v&&
-(g=this.editor.graph.defaultPageBackgroundColor);this.convertImages(F.getSvg(g,null,null,A,null,null!=k?k:!0,null,null,null,p),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=h?Math.min(1,Math.min(3*b/(4*k),b/n)):b/n);n=Math.ceil(m*n)+2*z;k=Math.ceil(m*k)+2*z;l.setAttribute("width",n);l.setAttribute("height",k);var v=l.getContext("2d");
-null!=g&&(v.beginPath(),v.rect(0,0,n,k),v.fillStyle=g,v.fill());v.scale(m,m);mxClient.IS_SF?window.setTimeout(function(){v.drawImage(d,z/m,z/m);a(l)},0):(v.drawImage(d,z/m,z/m),a(l))}catch(L){null!=f&&f(L)}});d.onerror=function(a){null!=f&&f(a)};try{p&&this.editor.graph.addSvgShadow(c,c);var l=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(F,
+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,f,h,k,m,u){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
+try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,m):null,u)}catch(F){"Invalid image"==F.message?this.downloadFile(u):this.handleError(F)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,h,k)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
+"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,g={},f=mxUtils.bind(this,function(){if(0==d){for(var f=[c[0]],h=1;h<c.length;h++){var l=c[h].indexOf(")");f.push('url("');f.push(g[b(c[h].substring(0,l))]);f.push('"'+c[h].substring(l))}this.editor.resolvedFontCss=f.join("");a()}});if(0<c.length)for(var h=1;h<c.length;h++){var k=c[h].indexOf(")"),u=null,m=c[h].indexOf("format(",k);0<m&&(u=b(c[h].substring(m+7,c[h].indexOf(")",m))));mxUtils.bind(this,function(a){if(null==
+g[a]){g[a]=a;d++;var b="application/x-font-ttf";if("svg"==u||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==u||"embedded-opentype"==u||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==u||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==u||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==u||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==u||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=
+a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){g[a]=b;d--;f()}),mxUtils.bind(this,function(a){d--;f()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[h].substring(0,k)),u)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,h,k,m,u,p,E,F,z,A){h=null!=h?h:!0;F=null!=F?F:this.editor.graph;z=null!=z?z:0;var g=u?null:F.background;g==mxConstants.NONE&&(g=null);null==g&&(g=d);null==g&&0==u&&
+(g=this.editor.graph.defaultPageBackgroundColor);this.convertImages(F.getSvg(g,null,null,A,null,null!=k?k:!0,null,null,null,p),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var l=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=h?Math.min(1,Math.min(3*b/(4*k),b/n)):b/n);n=Math.ceil(m*n)+2*z;k=Math.ceil(m*k)+2*z;l.setAttribute("width",n);l.setAttribute("height",k);var u=l.getContext("2d");
+null!=g&&(u.beginPath(),u.rect(0,0,n,k),u.fillStyle=g,u.fill());u.scale(m,m);mxClient.IS_SF?window.setTimeout(function(){u.drawImage(d,z/m,z/m);a(l)},0):(u.drawImage(d,z/m,z/m),a(l))}catch(L){null!=f&&f(L)}});d.onerror=function(a){null!=f&&f(a)};try{p&&this.editor.graph.addSvgShadow(c,c);var l=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(F,
c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(l)}catch(C){null!=f&&f(C)}}),c,E)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var g="http://"==d.substring(0,7)||"https://"==d.substring(0,8);g&&!navigator.onLine?d=c.svgBrokenImage.src:!g||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=
d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var g=0,f=c||{};c=mxUtils.bind(this,function(c,h){for(var l=a.getElementsByTagName(c),n=0;n<l.length;n++)mxUtils.bind(this,function(c){var l=d.convert(c.getAttribute(h));if(null!=l&&"data:"!=l.substring(0,5)){var n=f[l];null==n?(g++,this.convertImageToDataUri(l,function(d){null!=d&&(f[l]=d,c.setAttribute(h,
d));g--;0==g&&b(a)})):c.setAttribute(h,n)}else null!=l&&c.setAttribute(h,l)})(l[n])});c("image","xlink:href");c("img","src");0==g&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,f,h){try{var g=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);f=null!=f?f:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),f=0;f<a.length;f++)d[f]=String.fromCharCode(a[f]);d=d.join("")}h=null!=h?h:"data:image/png;base64,";d=h+this.base64Encode(d)}b(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){f&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(v){null!=c&&c(v)}};EditorUi.prototype.isCorsEnabledForUrl=
+"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),f=0;f<a.length;f++)d[f]=String.fromCharCode(a[f]);d=d.join("")}h=null!=h?h:"data:image/png;base64,";d=h+this.base64Encode(d)}b(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){f&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(u){null!=c&&c(u)}};EditorUi.prototype.isCorsEnabledForUrl=
function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=
function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),g=a.getContext("2d");a.height=c.height;a.width=c.width;g.drawImage(c,0,0);try{b(a.toDataURL())}catch(w){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
function(a,b,c,d,f){b=null!=b?b:0;c=null!=c?c:0;var g=[];try{var h=this.editor.graph;if(null!=a&&0<a.length){var l=mxUtils.parseXml(a),n=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var k=n.getElementsByTagName("diagram");if(1==k.length)n=mxUtils.parseXml(h.decompress(mxUtils.getTextContent(k[0]))).documentElement;else if(1<k.length){h.model.beginUpdate();try{for(a=0;a<k.length;a++){k[a].removeAttribute("id");var m=this.updatePageRoot(new DiagramPage(k[a])),
-p=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[p+1]));h.model.execute(new ChangePage(this,m,m,p))}}finally{h.model.endUpdate()}}}null!=n&&"mxGraphModel"===n.nodeName&&(g=h.importGraphModel(n,b,c,d))}}catch(z){throw f||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}return g};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=
-d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(d)&&null!=VSD_CONVERT_URL){var g=new FormData;g.append("file1",a,d);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType="blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{f.response.name=d,this.doImportVisio(f.response,b,c)}catch(y){c(y)}else c({})});
-f.send(g)}else try{this.doImportVisio(a,b,c)}catch(y){c(y)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(t){c(t)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?
-d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(l){this.handleError(l)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,
+p=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[p+1]));h.model.execute(new ChangePage(this,m,m,p))}}finally{h.model.endUpdate()}}}null!=n&&"mxGraphModel"===n.nodeName&&(g=h.importGraphModel(n,b,c,d))}}catch(z){if(f)throw z;this.handleError(z)}return g};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,
+function(a){this.handleError(a)});var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(d)&&null!=VSD_CONVERT_URL){var g=new FormData;g.append("file1",a,d);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType="blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{f.response.name=d,this.doImportVisio(f.response,b,c)}catch(y){c(y)}else c({})});f.send(g)}else try{this.doImportVisio(a,
+b,c)}catch(y){c(y)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(t){c(t)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
+d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,
function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{b(LucidImporter.importState(JSON.parse(a)))}catch(t){c(t)}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,
g=null;d.getModel().beginUpdate();try{g=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=center;verticalAlign=middle;"),d.updateCellSize(g,!0)}finally{d.getModel().endUpdate()}return g};EditorUi.prototype.insertTextAt=function(a,b,c,d,f,h,k){h=null!=h?h:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,
function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var l=this.extractGraphModelFromPng(a),n=this.importXml(l,b,c,h,!0);if(0<n.length)return n}if("data:image/svg+xml;"==a.substring(0,19))try{if(l=null,"data:image/svg+xml;base64,"==a.substring(0,
@@ -8075,23 +8099,23 @@ else{g=this.editor.graph;f=null;g.getModel().beginUpdate();try{f=g.insertVertex(
g.setLinkForCell(f,f.value),f.geometry.width+=g.gridSize,f.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&'{"state":"{\\"Properties\\":'==a.substring(0,26)};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&
this.importFiles(c.files,null,null,this.maxImageSize)}));c.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a)}),
-null,b)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var g=this.dialog,f=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(g,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,d,f,h,k,m,v,p,E){p=null!=p?p:!0;var g=!1,l=null,n=mxUtils.bind(this,function(a){var b=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,p);null!=m&&m(b)});"image"==b.substring(0,5)?(v=!1,"image/png"==b.substring(0,9)&&(b=E?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,p),v=!0)),v||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),p&&l.isGridEnabled()&&(c=l.snap(c),d=l.snap(d)),l=[l.insertVertex(null,null,"",c,d,f,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)?(g=!0,this.importGraphML(a,n)):null!=v&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(g=!0,this.importVisio(v,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(g=!0,this.parseFile(null!=v?v:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?n(a.responseText):null!=m&&m(null))}),k)):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||
+null,b)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var g=this.dialog,f=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(g,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,d,f,h,k,m,u,p,E){p=null!=p?p:!0;var g=!1,l=null,n=mxUtils.bind(this,function(a){var b=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,p);null!=m&&m(b)});"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=E?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(l=this.importXml(b,c,d,p),u=!0)),u||(l=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),p&&l.isGridEnabled()&&(c=l.snap(c),d=l.snap(d)),l=[l.insertVertex(null,null,"",c,d,f,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)?(g=!0,this.importGraphML(a,n)):null!=u&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(g=!0,this.importVisio(u,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(g=!0,this.parseFile(null!=u?u:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?n(a.responseText):null!=m&&m(null))}),k)):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||
(l=this.insertTextAt(this.validateFileData(a),c,d,!0,null,p));g||null==m||m(l);return l};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,g,f,h;c<d;){g=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);
b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}h=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(h&192)>>6);b+=
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,f,h,k,m,v,p,E,F){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;p=null!=p?p:this.maxImageBytes;var g=null!=b&&null!=c,l=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=E||this.resampleThreshold,x=0;x<a.length;x++)if("image/"==a[x].type.substring(0,6)&&a[x].size>q){n=!0;break}var t=mxUtils.bind(this,function(){var n=this.editor.graph,v=n.gridSize;
-f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,h,l,n,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,d,f,h,l,n,k,g,F)});h=null!=h?h:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,x=q,t=[],u=mxUtils.bind(this,function(a,b){t[a]=b;if(0==--x){this.spinner.stop();if(null!=m)m(t);else{var c=[];n.getModel().beginUpdate();
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,f,h,k,m,u,p,E,F){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;p=null!=p?p:this.maxImageBytes;var g=null!=b&&null!=c,l=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=E||this.resampleThreshold,x=0;x<a.length;x++)if("image/"==a[x].type.substring(0,6)&&a[x].size>q){n=!0;break}var t=mxUtils.bind(this,function(){var n=this.editor.graph,u=n.gridSize;
+f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,h,l,n,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,d,f,h,l,n,k,g,F)});h=null!=h?h:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,x=q,t=[],v=mxUtils.bind(this,function(a,b){t[a]=b;if(0==--x){this.spinner.stop();if(null!=m)m(t);else{var c=[];n.getModel().beginUpdate();
try{for(var d=0;d<t.length;d++){var g=t[d]();null!=g&&(c=c.concat(g))}}finally{n.getModel().endUpdate()}}h(c)}}),w=0;w<q;w++)mxUtils.bind(this,function(g){var h=a[g],m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var m=a.target.result,q=m.indexOf(","),x=decodeURIComponent(escape(atob(m.substring(q+1)))),t=mxUtils.parseXml(x),x=t.getElementsByTagName("svg");if(0<x.length){var x=x[0],w=F?null:x.getAttribute("content");
-null!=w&&"<"!=w.charAt(0)&&"%"!=w.charAt(0)&&(w=unescape(window.atob?atob(w):Base64.decode(w,!0)));null!=w&&"%"==w.charAt(0)&&(w=decodeURIComponent(w));null==w||"<mxfile "!==w.substring(0,8)&&"<mxGraphModel "!==w.substring(0,14)?u(g,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var l=a[0],k=parseFloat(l.getAttribute("width")),p=parseFloat(l.getAttribute("height")),x=l.getAttribute("viewBox");if(null==x||0==x.length)l.setAttribute("viewBox",
-"0 0 "+k+" "+p);else if(isNaN(k)||isNaN(p)){var u=x.split(" ");3<u.length&&(k=parseFloat(u[2]),p=parseFloat(u[3]))}m=this.createSvgDataUri(mxUtils.getXml(l));var w=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,p)),F=f(m,h.type,b+g*v,c+g*v,Math.max(1,Math.round(k*w)),Math.max(1,Math.round(p*w)),h.name);if(isNaN(k)||isNaN(p)){var E=new Image;E.onload=mxUtils.bind(this,function(){k=Math.max(1,E.width);p=Math.max(1,E.height);F[0].geometry.width=k;F[0].geometry.height=p;l.setAttribute("viewBox","0 0 "+
-k+" "+p);m=this.createSvgDataUri(mxUtils.getXml(l));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));n.setCellStyles("image",m,[F[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(l))}return F}}}catch(na){}return null})):u(g,mxUtils.bind(this,function(){return f(w,"text/xml",b+g*v,c+g*v,0,0,h.name)}))}else u(g,mxUtils.bind(this,function(){return null}))}else{x=!1;if("image/png"==h.type){var z=F?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var y=
-new Image;y.src=a.target.result;u(g,mxUtils.bind(this,function(){return f(z,"text/xml",b+g*v,c+g*v,y.width,y.height,h.name)}));x=!0}}x||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(n){this.resizeImage(n,a.target.result,
-mxUtils.bind(this,function(n,k,m){u(g,mxUtils.bind(this,function(){if(null!=n&&n.length<p){var q=l&&this.isResampleImage(a.target.result,E)?Math.min(1,Math.min(d/k,d/m)):1;return f(n,h.type,b+g*v,c+g*v,Math.round(k*q),Math.round(m*q),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,E)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else f(a.target.result,h.type,b+g*v,c+g*v,240,160,h.name,function(a){u(g,
-function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(h.name)||/(\.vs(x|sx?))($|\?)/i.test(h.name)?f(null,h.type,b+g*v,c+g*v,240,160,h.name,function(a){u(g,function(){return a})},h):"image"==h.type.substring(0,5)?m.readAsDataURL(h):m.readAsText(h)})(w)});n?this.confirmImageResize(function(a){l=a;t()},v):t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
+null!=w&&"<"!=w.charAt(0)&&"%"!=w.charAt(0)&&(w=unescape(window.atob?atob(w):Base64.decode(w,!0)));null!=w&&"%"==w.charAt(0)&&(w=decodeURIComponent(w));null==w||"<mxfile "!==w.substring(0,8)&&"<mxGraphModel "!==w.substring(0,14)?v(g,mxUtils.bind(this,function(){try{if(m.substring(0,q+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var l=a[0],k=parseFloat(l.getAttribute("width")),p=parseFloat(l.getAttribute("height")),x=l.getAttribute("viewBox");if(null==x||0==x.length)l.setAttribute("viewBox",
+"0 0 "+k+" "+p);else if(isNaN(k)||isNaN(p)){var w=x.split(" ");3<w.length&&(k=parseFloat(w[2]),p=parseFloat(w[3]))}m=this.createSvgDataUri(mxUtils.getXml(l));var v=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,p)),F=f(m,h.type,b+g*u,c+g*u,Math.max(1,Math.round(k*v)),Math.max(1,Math.round(p*v)),h.name);if(isNaN(k)||isNaN(p)){var E=new Image;E.onload=mxUtils.bind(this,function(){k=Math.max(1,E.width);p=Math.max(1,E.height);F[0].geometry.width=k;F[0].geometry.height=p;l.setAttribute("viewBox","0 0 "+
+k+" "+p);m=this.createSvgDataUri(mxUtils.getXml(l));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));n.setCellStyles("image",m,[F[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(l))}return F}}}catch(na){}return null})):v(g,mxUtils.bind(this,function(){return f(w,"text/xml",b+g*u,c+g*u,0,0,h.name)}))}else v(g,mxUtils.bind(this,function(){return null}))}else{x=!1;if("image/png"==h.type){var z=F?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var y=
+new Image;y.src=a.target.result;v(g,mxUtils.bind(this,function(){return f(z,"text/xml",b+g*u,c+g*u,y.width,y.height,h.name)}));x=!0}}x||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,
+mxUtils.bind(this,function(k,n,m){v(g,mxUtils.bind(this,function(){if(null!=k&&k.length<p){var q=l&&this.isResampleImage(a.target.result,E)?Math.min(1,Math.min(d/n,d/m)):1;return f(k,h.type,b+g*u,c+g*u,Math.round(n*q),Math.round(m*q),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,d,E)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else f(a.target.result,h.type,b+g*u,c+g*u,240,160,h.name,function(a){v(g,
+function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(h.name)||/(\.vs(x|sx?))($|\?)/i.test(h.name)?f(null,h.type,b+g*u,c+g*u,240,160,h.name,function(a){v(g,function(){return a})},h):"image"==h.type.substring(0,5)?m.readAsDataURL(h):m.readAsText(h)})(w)});n?this.confirmImageResize(function(a){l=a;t()},u):t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
mxSettings.getResizeImages():null,g=function(d,g){if(d||b)mxSettings.setResizeImages(d?g:null),mxSettings.save();c();a(g)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){g(a,!0)},function(a){g(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||
mxClient.IS_CHROMEAPP?220:200,!0,!0):g(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var g=new XMLHttpRequest;g.open("POST",OPEN_URL);g.onreadystatechange=function(){b(g)};g.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,f,h){f=null!=f?f:this.maxImageSize;var g=Math.max(1,a.width),l=Math.max(1,a.height);
-if(d&&this.isResampleImage(b,h))try{var n=Math.max(g/f,l/f);if(1<n){var k=Math.round(g/n),m=Math.round(l/n),p=document.createElement("canvas");p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var q=p.toDataURL();if(q.length<b.length){var t=document.createElement("canvas");t.width=k;t.height=m;var u=t.toDataURL();q!==u&&(b=q,g=k,l=m)}}}catch(B){}c(b,g,l)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var d=b,f=0;8>f;f++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[b]=
+if(d&&this.isResampleImage(b,h))try{var k=Math.max(g/f,l/f);if(1<k){var n=Math.round(g/k),m=Math.round(l/k),p=document.createElement("canvas");p.width=n;p.height=m;p.getContext("2d").drawImage(a,0,0,n,m);var q=p.toDataURL();if(q.length<b.length){var t=document.createElement("canvas");t.width=n;t.height=m;var v=t.toDataURL();q!==v&&(b=q,g=n,l=m)}}}catch(B){}c(b,g,l)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var d=b,f=0;8>f;f++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[b]=
d;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var g=0;g<d;g++)a=EditorUi.prototype.crcTable[(a^b[c+g])&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,f){function g(a,b){var c=k;k+=b;return a.substring(c,k)}function h(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<
16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(g(a,4),"IHDR"!=g(a,4))null!=f&&f();else{g(a,17);f=a.substring(0,k);do{var n=h(a);if("IDAT"==g(a,4)){f=a.substring(0,k-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,
b,0,4);d=this.updateCRC(d,c,0,c.length);f+=l(c.length)+b+c+l(d^4294967295);f+=a.substring(k-8,a.length);break}f+=a.substring(k-8,k-4+n);g(a,n);g(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,g){a=d.substring(a+8,a+8+g);"zTXt"==c?(g=a.indexOf(String.fromCharCode(0)),
@@ -8100,13 +8124,13 @@ c);d.src=a};var h=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxS
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};
var f=b.addClickHandler;b.addClickHandler=function(a,c,d){var g=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=g&&g(a,c)};f.call(this,a,c,d)};h.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var k=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:k.apply(this,arguments)};var m=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var g=c.getAttribute("href");if(null==g||!b.isCustomLink(g)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))m.apply(this,
-arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(g),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var v=function(){window.setTimeout(function(){x.innerHTML="&nbsp;";
+arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(g),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var u=function(){window.setTimeout(function(){x.innerHTML="&nbsp;";
x.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,g=0;g<c.types.length;g++)if("text/"===c.types[g].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var h=f[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,c,d,g,f,h){b.insertImage(a,f,h)},function(){},function(a){return"image/"==a.type.substring(0,
6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var l=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],l.x,l.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var E=!1;this.keyHandler.bindControlKey(88,null);
this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||E||(x.style.left=b.container.scrollLeft+10+"px",x.style.top=b.container.scrollTop+10+"px",b.container.appendChild(x),
E=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!E||224!=c&&17!=c&&91!=c||(E=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),x.parentNode.removeChild(x),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(x,
-"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(x),v())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(x,!0),v())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var F=this.isSelectionAllowed;this.isSelectionAllowed=
+"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(x),u())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(x,!0),u())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var F=this.isSelectionAllowed;this.isSelectionAllowed=
function(a){return mxEvent.getSource(a)==x?!0:F.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,g,f,h){b.insertImage(a,f,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var g=this.maxImageSize,g=Math.min(1,Math.min(g/Math.max(1,d)),g/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*g,a*g)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
@@ -8117,7 +8141,7 @@ function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionC
this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,g=b.view.scale,f=c.x/g-d.x,h=c.y/g-d.y;mxEvent.isAltDown(a)&&(h=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
f,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var n=null,d=c.getElementsByTagName("img");
-null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var v=!0,m=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,h,!0,n,null,v))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){v=a;m()},mxEvent.isControlDown(a)):m()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,
+null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var u=!0,m=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,h,!0,n,null,u))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){u=a;m()},mxEvent.isControlDown(a)):m()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,
function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,h,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,f,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
f,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();this.editUpdateListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");null!=c&&this.updateEditReferences(c)});this.editor.undoManager.addListener(mxEvent.BEFORE_UNDO,this.editUpdateListener);this.editor.undoManager.addListener(mxEvent.BEFORE_REDO,this.editUpdateListener);"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,
arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};
@@ -8126,8 +8150,8 @@ mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.con
mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),g=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(g));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=g,c.pasteCounter=0);a.focus();
document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,0,0))}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a))}else{var d=
-this.editor.graph,g=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var h=g.lastIndexOf("%3E");0<=h&&h<g.length-3&&(g=g.substring(0,h+3))}catch(v){}try{var c=b.getElementsByTagName("span"),l=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(f=!0,g=l)}catch(v){}d.lastPasteXml==g?d.pasteCounter++:(d.lastPasteXml=g,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=
-g&&0<g.length&&(f||this.isCompatibleString(g)?d.setSelectionCells(this.importXml(g,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==g&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(g,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=
+this.editor.graph,g=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var h=g.lastIndexOf("%3E");0<=h&&h<g.length-3&&(g=g.substring(0,h+3))}catch(u){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(g);this.isCompatibleString(k)&&(f=!0,g=k)}catch(u){}d.lastPasteXml==g?d.pasteCounter++:(d.lastPasteXml=g,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=
+g&&0<g.length&&(f||this.isCompatibleString(g)?d.setSelectionCells(this.importXml(g,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==g&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(g,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(u){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=
null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&
(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?
c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&
@@ -8155,9 +8179,9 @@ error:I.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner
a;h.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;h.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){h.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==k.action)this.searchReadyCallback(k.list,k.errorMsg);else if("recentDocsList"==
k.action)this.recentReadyCallback(k.list,k.errorMsg);else{if("textContent"==k.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,l="";if(null!=this.pages)for(n=0;n<this.pages.length;n++){var p=m;this.currentPage!=this.pages[n]&&(p=this.createTemporaryGraph(m.getStylesheet()),p.model.setRoot(this.pages[n].root));l+=this.pages[n].getName()+" "+p.getIndexableText()+" "}else l=m.getIndexableText();this.editor.graph.setEnabled(!0);h.postMessage(JSON.stringify({event:"textContent",data:l,
message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var q=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,q):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==
-k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var w=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(w);h.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(w))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),y=m.getGlobalVariable,C=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:y.apply(this,arguments)};document.body.appendChild(m.container);
-m.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(w)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
+k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var w=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,v=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(w);h.postMessage(JSON.stringify(b),"*")}),t=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(w))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);v(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),y=m.getGlobalVariable,C=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?C.getName():"pagenumber"==a?1:y.apply(this,arguments)};document.body.appendChild(m.container);
+m.model.setRoot(C.root)}this.exportToCanvas(mxUtils.bind(this,function(a){t(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){t(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(w)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?v("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=
k.xml&&0<k.xml.length&&this.setFileData(k.xml);q=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),q.xml=mxUtils.getXml(l),q.data=this.getFileData(null,null,!0,null,null,null,l),q.format=k.format;else if("html"==k.format)w=this.editor.getGraphXml(),q.data=this.getHtml(w,this.editor.graph),q.xml=mxUtils.getXml(w),q.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;
l==mxConstants.NONE&&(l=null);q.xml=this.getFileData(!0);q.format="svg";if(k.embedImages||null==k.embedImages){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==k.format?this.getEmbeddedSvg(q.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(a);h.postMessage(JSON.stringify(q),"*")})):this.convertImages(this.editor.graph.getSvg(l),
mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(mxUtils.getXml(a));h.postMessage(JSON.stringify(q),"*")}));return}l="xmlsvg"==k.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));q.data=this.createSvgDataUri(l)}h.postMessage(JSON.stringify(q),"*")}return}if("load"==k.action)d=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=
@@ -8198,19 +8222,19 @@ EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=t
this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));
this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);
this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var p=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);p.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,f,h){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,f,h)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=g.getGraphBounds(),n=Math.floor(l.width*f/g.view.scale),
-m=Math.floor(l.height*f/g.view.scale);k.length<=MAX_REQUEST_SIZE&&n*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+n+"&h="+m+"&border="+h+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
+this.exportDialog=null);p.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,f,h){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,f,h)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),l=g.getGraphBounds(),m=Math.floor(l.width*f/g.view.scale),
+n=Math.floor(l.height*f/g.view.scale);k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+n+"&border="+h+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var f=this.getFutureCellForEdit(c.model,a,d.source.id);f!=d.source&&(d.source=f)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var f=b.changes.length-1;0<=f;f--){var g=b.changes[f];if(g.constructor==mxChildChange&&null!=g.child&&g.child.id==c){a.contains(g.previous)&&
(d=g.child);break}}return d}})();EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
EditorUi.prototype.patchPages=function(a,c,b,d,f){var h={},k=[],m={},p={},g={},l={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var n in d[EditorUi.DIFF_UPDATE])h[n]=d[EditorUi.DIFF_UPDATE][n];if(null!=c[EditorUi.DIFF_REMOVE])for(d=0;d<c[EditorUi.DIFF_REMOVE].length;d++)p[c[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(d=0;d<c[EditorUi.DIFF_INSERT].length;d++)m[c[EditorUi.DIFF_INSERT][d].previous]=c[EditorUi.DIFF_INSERT][d];if(null!=c[EditorUi.DIFF_UPDATE])for(n in c[EditorUi.DIFF_UPDATE])d=
-c[EditorUi.DIFF_UPDATE][n],null!=d.previous&&(l[d.previous]=n);if(null!=a){var q="";for(d=0;d<a.length;d++){var t=a[d].getId();g[t]=a[d];null!=l[q]||p[t]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][t]&&null!=c[EditorUi.DIFF_UPDATE][t].previous||(l[q]=t);q=t}}var u={},w=mxUtils.bind(this,function(a){var d=null!=a?a.getId():"";if(null!=a&&!u[d]){u[d]=!0;k.push(a);var n=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][d]:null;null!=n&&(this.updatePageRoot(a),null!=n.name&&a.setName(n.name),
+c[EditorUi.DIFF_UPDATE][n],null!=d.previous&&(l[d.previous]=n);if(null!=a){var q="";for(d=0;d<a.length;d++){var t=a[d].getId();g[t]=a[d];null!=l[q]||p[t]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][t]&&null!=c[EditorUi.DIFF_UPDATE][t].previous||(l[q]=t);q=t}}var v={},w=mxUtils.bind(this,function(a){var d=null!=a?a.getId():"";if(null!=a&&!v[d]){v[d]=!0;k.push(a);var n=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][d]:null;null!=n&&(this.updatePageRoot(a),null!=n.name&&a.setName(n.name),
null!=n.view&&this.patchViewState(a,n.view),null!=n.cells&&this.patchPage(a,n.cells,h[a.getId()],f),!b||null==n.cells&&null==n.view||(a.needsUpdate=!0))}a=l[d];null!=a&&(delete l[d],w(g[a]));a=m[d];null!=a&&(delete m[d],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=g[a.getId()];null==c?w(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});w();for(n in l)w(g[l[n]]),
delete l[n];for(n in m)y(m[n]),delete m[n];return k};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
EditorUi.prototype.createParentLookup=function(a,c){function b(a){var b=d[a];null==b&&(b={inserted:[],moved:{}},d[a]=b);return b}var d={};if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++){var h=c[EditorUi.DIFF_INSERT][f],k=null!=h.parent?h.parent:"",m=null!=h.previous?h.previous:"";b(k).inserted[m]=h}if(null!=c[EditorUi.DIFF_UPDATE])for(var p in c[EditorUi.DIFF_UPDATE])h=c[EditorUi.DIFF_UPDATE][p],null!=h.previous&&(k=h.parent,null==k&&(f=a.getCell(p),null!=f&&(f=
a.getParent(f),null!=f&&(k=f.getId()))),null!=k&&(b(k).moved[h.previous]=p));return d};
EditorUi.prototype.patchPage=function(a,c,b,d){var f=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),h=this.createParentLookup(f,c);f.beginUpdate();try{var k=f.updateEdgeParent,m=new mxDictionary,p=[];f.updateEdgeParent=function(a,b){!m.get(a)&&d&&(m.put(a,!0),p.push(a))};var g=h[""],l=null!=g&&null!=g.inserted?g.inserted[""]:null,n=null;null!=l&&(n=this.getCellForJson(l));if(null==n){var q=null!=g&&null!=g.moved?g.moved[""]:null;null!=q&&(n=f.getCell(q))}null!=n&&(f.setRoot(n),
-a.root=n);this.patchCellRecursive(a,f,f.root,h,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var t=0;t<c[EditorUi.DIFF_REMOVE].length;t++){var u=f.getCell(c[EditorUi.DIFF_REMOVE][t]);null!=u&&f.remove(u)}if(null!=c[EditorUi.DIFF_UPDATE]){var w=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(q in c[EditorUi.DIFF_UPDATE])this.patchCell(f,f.getCell(q),c[EditorUi.DIFF_UPDATE][q],null!=w?w[q]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(t=0;t<c[EditorUi.DIFF_INSERT].length;t++)l=c[EditorUi.DIFF_INSERT][t],
-u=f.getCell(l.id),null!=u&&(f.setTerminal(u,f.getCell(l.source),!0),f.setTerminal(u,f.getCell(l.target),!1));f.updateEdgeParent=k;if(d&&0<p.length)for(t=0;t<p.length;t++)f.contains(p[t])&&f.updateEdgeParent(p[t])}finally{f.endUpdate()}};
+a.root=n);this.patchCellRecursive(a,f,f.root,h,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var t=0;t<c[EditorUi.DIFF_REMOVE].length;t++){var v=f.getCell(c[EditorUi.DIFF_REMOVE][t]);null!=v&&f.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var w=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(q in c[EditorUi.DIFF_UPDATE])this.patchCell(f,f.getCell(q),c[EditorUi.DIFF_UPDATE][q],null!=w?w[q]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(t=0;t<c[EditorUi.DIFF_INSERT].length;t++)l=c[EditorUi.DIFF_INSERT][t],
+v=f.getCell(l.id),null!=v&&(f.setTerminal(v,f.getCell(l.source),!0),f.setTerminal(v,f.getCell(l.target),!1));f.updateEdgeParent=k;if(d&&0<p.length)for(t=0;t<p.length;t++)f.contains(p[t])&&f.updateEdgeParent(p[t])}finally{f.endUpdate()}};
EditorUi.prototype.patchCellRecursive=function(a,c,b,d,f){if(null!=b){for(var h=d[b.getId()],k=null!=h&&null!=h.inserted?h.inserted:{},m=null!=h&&null!=h.moved?h.moved:{},p=0,h=c.getChildCount(b),g="",l=0;l<h;l++){var n=c.getChildAt(b,l).getId();null==m[g]&&(null==f[EditorUi.DIFF_UPDATE]||null==f[EditorUi.DIFF_UPDATE][n]||null==f[EditorUi.DIFF_UPDATE][n].previous&&null==f[EditorUi.DIFF_UPDATE][n].parent)&&(m[g]=n);g=n}var q=mxUtils.bind(this,function(g){var h=null!=g?g.getId():"";null!=g&&(c.getChildAt(b,
p)!=g&&c.add(b,g,p),this.patchCellRecursive(a,c,g,d,f),p++);g=m[h];null!=g&&(delete m[h],q(c.getCell(g)));g=k[h];null!=g&&(delete k[h],q(this.getCellForJson(g)))});q();for(var t in m)q(c.getCell(m[t])),delete m[t];for(t in k)q(this.getCellForJson(k[t])),delete k[t]}};
EditorUi.prototype.patchCell=function(a,c,b,d){if(null!=c&&null!=b){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in b?a.setValue(c,b.value):null!=b.xmlValue&&a.setValue(c,mxUtils.parseXml(b.xmlValue).documentElement);null!=d&&null!=d.style||null==b.style||a.setStyle(c,b.style);null!=b.visible&&a.setVisible(c,1==b.visible);null!=b.collapsed&&a.setCollapsed(c,1==b.collapsed);null!=b.vertex&&(c.vertex=1==b.vertex);null!=b.edge&&(c.edge=1==b.edge);null!=b.connectable&&(c.connectable=
@@ -8261,7 +8285,7 @@ DrawioFileSync.prototype.fileChangedNotify=function(){if(this.isValidState())if(
DrawioFileSync.prototype.fileChanged=function(a,c,b){var d=window.setTimeout(mxUtils.bind(this,function(){null!=b&&b()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(d){null!=b&&b()||(this.isValidState()?this.catchup(this.file.getDescriptorEtag(d),this.file.getDescriptorSecret(d),a,c,b):null!=c&&c())}),c):null!=c&&c())}),0);return this.notifyThread=d};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorEtag(a,this.file.getCurrentEtag()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(a,c,b,d,f){if(null==f||!f()){var h=this.file.getCurrentEtag();if(h==a)null!=b&&b();else if(this.isValidState()){var k=0,m=!1,p=mxUtils.bind(this,function(){null!=f&&f()||(h!=this.file.getCurrentEtag()?null!=b&&b():this.isValidState()?mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(h)+"&to="+encodeURIComponent(a)+(null!=c?"&secret="+encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=
-c.getText().length;if(null==f||!f())if(h!=this.file.getCurrentEtag())null!=b&&b();else if(this.isValidState()){var g=null,n=[],q=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var t=JSON.parse(c.getText());if(null!=t&&0<t.length)for(var u=0;u<t.length;u++){var w=this.stringToObject(t[u]);if(w.v>DrawioFileSync.PROTOCOL){m=!0;q=[];break}else if(w.v===DrawioFileSync.PROTOCOL&&null!=w.d)g=w.d.checksum,q.push(w.d.patch),null!=w.d.details&&(w.d.details.checksum=g,n.push(JSON.stringify(w.d.details)));
+c.getText().length;if(null==f||!f())if(h!=this.file.getCurrentEtag())null!=b&&b();else if(this.isValidState()){var g=null,n=[],q=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var t=JSON.parse(c.getText());if(null!=t&&0<t.length)for(var v=0;v<t.length;v++){var w=this.stringToObject(t[v]);if(w.v>DrawioFileSync.PROTOCOL){m=!0;q=[];break}else if(w.v===DrawioFileSync.PROTOCOL&&null!=w.d)g=w.d.checksum,q.push(w.d.patch),null!=w.d.details&&(w.d.details.checksum=g,n.push(JSON.stringify(w.d.details)));
else{m=!0;q=[];break}}}catch(y){q=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,g,a,b,d,f,n)):k<=this.maxCacheReadyRetries&&!m&&401!=c.getStatus()?(k++,this.file.stats.cacheMiss++,window.setTimeout(p,(k+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(b,d,f))}catch(y){null!=d&&d(y)}}else null!=d&&d()})):null!=d&&d())});window.setTimeout(p,this.cacheReadyDelay)}else null!=d&&d()}};
DrawioFileSync.prototype.reload=function(a,c,b,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b,d)};
DrawioFileSync.prototype.merge=function(a,c,b,d,f,h,k){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.checkPages(this.file.shadowPages,"merge init");this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;if(this.file.ignorePatches(a))this.file.stats.shadowState=this.ui.hashValue(b);
@@ -8271,9 +8295,9 @@ k;this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrent
this.file.compressReportData(JSON.stringify(a,null,2)),l)}catch(n){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentEtag(),d=this.objectToString({});mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=this.ui.editor.graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(this.ui.editor.graph.decompress(a))};
-DrawioFileSync.prototype.fileSaved=function(a,c,b,d){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var f=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),h={v:EditorUi.VERSION,t:(new Date).toISOString(),ua:navigator.userAgent};d=this.ui.getHashValueForPages(a,
-h);f=this.ui.diffPages(f,a);c=this.file.getDescriptorEtag(c);var k=this.file.getCurrentEtag();h.from=this.ui.hashValue(c);h.to=this.ui.hashValue(k);var h=this.objectToString(this.createMessage({patch:f,checksum:d,details:h})),m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),p=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=h.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+
-"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(m)+(null!=p?"&secret="+encodeURIComponent(p):"")+(h.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(h):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",k,h.length,"bytes","diff",f,"checksum",d)}this.file.shadowPages=a;null!=b&&b()};
+DrawioFileSync.prototype.fileSaved=function(a,c,b,d){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId&&this.isConnected())){var f=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),h={v:EditorUi.VERSION,t:(new Date).toISOString(),ua:navigator.userAgent};
+d=this.ui.getHashValueForPages(a,h);f=this.ui.diffPages(f,a);c=this.file.getDescriptorEtag(c);var k=this.file.getCurrentEtag();h.from=this.ui.hashValue(c);h.to=this.ui.hashValue(k);var h=this.objectToString(this.createMessage({patch:f,checksum:d,details:h})),m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),p=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=h.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+
+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(m)+(null!=p?"&secret="+encodeURIComponent(p):"")+(h.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(h):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",k,h.length,"bytes","diff",f,"checksum",d)}this.file.shadowPages=a;null!=b&&b()};
DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&(a+="&sid="+this.pusher.connection.socket_id);return a};DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(a,c,b){this.catchupRetryCount++;if(this.catchupRetryCount<this.maxCatchupRetries)if(this.file.stats.conflicts++,null!=a){var d=this.file.getDescriptorEtag(a);a=this.file.getDescriptorSecret(a);this.catchup(d,a,c,b)}else this.fileChanged(c,b);else this.catchupRetryCount=0,this.file.stats.timeouts++,null!=b&&b({message:mxResources.get("timeout")})};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
@@ -8308,14 +8332,14 @@ Math.round(a*b),Math.round(c*b))}else{this.ctx.save();this.updateFont();n=docume
"middle";c-=(f.length-1)*n/2;p=c-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",c-=n*(f.length-1),p=c-this.state.fontSize}k=[];n=[];for(b=0;b<f.length;b++)n[b]=a,k[b]=this.ctx.measureText(f[b]).width,null!=h&&h!=mxConstants.ALIGN_LEFT&&(n[b]-=k[b],h==mxConstants.ALIGN_CENTER&&(n[b]+=k[b]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=n[0];h=k[0];for(b=1;b<f.length;b++)a=Math.min(a,n[b]),h=Math.max(h,k[b]);this.ctx.save();
a=Math.round(a)-.5;p=Math.round(p)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,p,h,this.state.fontSize*mxConstants.LINE_HEIGHT*f.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,p,h,this.state.fontSize*mxConstants.LINE_HEIGHT*f.length));this.ctx.restore()}for(b=0;b<f.length;b++)this.ctx.fillText(f[b],n[b],c),c+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,c){mxEventSource.call(this);this.ui=a;this.cookieName=c;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
-DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}};
-DrawioClient.prototype.getPersistentToken=function(){var a=null;isLocalStorage&&(a=localStorage.getItem("."+this.cookieName));if(null==a&&"undefined"!=typeof Storage){var c=document.cookie,b=this.cookieName+"=",d=c.indexOf(b);0<=d&&(d+=b.length,a=c.indexOf(";",d),0>a?a=c.length:postCookie=c.substring(a),a=c.substring(d,a),a=0<a.length?a:null,null!=a&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie=b+"; expires="+c.toUTCString(),localStorage.setItem("."+this.cookieName,a)))}return a};
-DrawioClient.prototype.setPersistentToken=function(a){if(null!=a)if(isLocalStorage)localStorage.setItem("."+this.cookieName,a);else{if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+10);a=this.cookieName+"="+a+"; path=/; expires="+c.toUTCString();"https"==document.location.protocol.toLowerCase()&&(a+=";secure");document.cookie=a}}else this.clearPersistentToken()};DrawioUser=function(a,c,b,d,f){this.id=a;this.email=c;this.displayName=b;this.pictureUrl=d;this.locale=f};DriveFile=function(a,c,b){DrawioFile.call(this,a,c);this.desc=b};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
+DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}};
+DrawioClient.prototype.getPersistentToken=function(a){var c=null;isLocalStorage&&(c=localStorage.getItem("."+this.cookieName),null==c&&a&&(c=sessionStorage.getItem("."+this.cookieName)));if(null==c&&"undefined"!=typeof Storage){var b=document.cookie;a=this.cookieName+"=";var d=b.indexOf(a);0<=d&&(d+=a.length,c=b.indexOf(";",d),0>c?c=b.length:postCookie=b.substring(c),c=b.substring(d,c),c=0<c.length?c:null,null!=c&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie=a+"; expires="+
+b.toUTCString(),localStorage.setItem("."+this.cookieName,c)))}return c};DrawioClient.prototype.setPersistentToken=function(a,c){if(null!=a)if(isLocalStorage)c?sessionStorage.setItem("."+this.cookieName,a):localStorage.setItem("."+this.cookieName,a);else{if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+10);b=this.cookieName+"="+a+"; path=/"+(c?"":"; expires="+b.toUTCString());"https"==document.location.protocol.toLowerCase()&&(b+=";secure");document.cookie=b}}else this.clearPersistentToken()};DrawioUser=function(a,c,b,d,f){this.id=a;this.email=c;this.displayName=b;this.pictureUrl=d;this.locale=f};DriveFile=function(a,c,b){DrawioFile.call(this,a,c);this.desc=b};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
DriveFile.prototype.isConflict=function(a){return null!=a&&null!=a.error&&412==a.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
DriveFile.prototype.getPublicUrl=function(a){gapi.client.drive.permissions.list({fileId:this.desc.id}).execute(mxUtils.bind(this,function(c){if(null!=c&&null!=c.items)for(var b=0;b<c.items.length;b++)if("anyoneWithLink"===c.items[b].id||"anyone"===c.items[b].id){a(this.desc.webContentLink);return}a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};
DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.save=function(a,c,b,d,f){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(null,a,c,b,d,f)};
-DriveFile.prototype.saveFile=function(a,c,b,d,f,h){if(!this.isEditable())null!=b&&b();else if(!this.savingFile){var k=mxUtils.bind(this,function(a,h){var g=this.data,l=this.desc,n=this.isModified();this.setModified(!1);this.savingFile=!0;var m=this.isModified;this.isModified=function(){return!0};this.ui.drive.saveFile(this,h,mxUtils.bind(this,function(a){this.isModified=m;this.savingFile=!1;0!=a?(c&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.min(6E3,Math.max(this.saveDelay+
-500,DrawioFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(g,l,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b(a)}),d)):(this.setModified(n||this.isModified()),null!=d&&d(a))}),mxUtils.bind(this,function(b,c){this.savingFile=!1;this.isModified=m;this.setModified(n||this.isModified());this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
+DriveFile.prototype.saveFile=function(a,c,b,d,f,h){if(!this.isEditable())null!=b&&b();else if(!this.savingFile){var k=mxUtils.bind(this,function(a,h){var g=this.data,l=this.desc,m=this.isModified();this.setModified(!1);this.savingFile=!0;var p=this.isModified;this.isModified=function(){return!0};this.ui.drive.saveFile(this,h,mxUtils.bind(this,function(a){this.isModified=p;this.savingFile=!1;0!=a?(c&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.min(6E3,Math.max(this.saveDelay+
+500,DrawioFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(g,l,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b(a)}),d)):(this.setModified(m||this.isModified()),null!=d&&d(a))}),mxUtils.bind(this,function(b,c){this.savingFile=!1;this.isModified=p;this.setModified(m||this.isModified());this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d()):null!=d&&d(b)}),f,f,a)});k(h,c)}};DriveFile.prototype.copyFile=function(a,c){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,c)}catch(b){c(b)}}),c,!0)};
DriveFile.prototype.makeCopy=function(a,c,b){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,b),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=c&&c()}))};DriveFile.prototype.saveAs=function(a,c,b){this.ui.drive.copyFile(this.getId(),a,c,b)};
DriveFile.prototype.rename=function(a,c,b){var d=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(f){this.hasSameExtension(a,this.getTitle())?(this.desc=f,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(d),null!=c&&c(f)):(this.desc=f,null!=this.sync&&this.sync.descriptorChanged(d),this.save(!0,c,b))}),b)};
@@ -8351,9 +8375,9 @@ a})}))};DriveClient.prototype.loadRealtime=function(a,c,b){"1"==urlParams.ignore
DriveClient.prototype.getXmlFile=function(a,c,b,d,f){d=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+d,mxUtils.bind(this,function(d){if(null==d)b({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||f)a.mimeType!=this.libraryMimeType||f?c(new DriveLibrary(this.ui,d,a)):b({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var h=d.lastIndexOf(",");if(0<h){var m=this.ui.extractGraphModelFromPng(d.substring(h+
1));if(null!=m&&0<m.length)d=m;else try{var p=atob(d.substring(h+1));null==p||"<mxfile "!==p.substring(0,8)&&"<mxGraphModel "!==p.substring(0,14)&&"<mxGraphModel>"!==p.substring(0,14)||(d=p)}catch(g){}}}else"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(p=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p));c(new DriveFile(this.ui,d,a))}}),b,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))};
DriveClient.prototype.saveFile=function(a,c,b,d,f,h,k,m){if(a.isEditable()){var p=(new Date).getTime();f=null!=f?f:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;h=null!=h?h:!1;var g=mxUtils.bind(this,function(f,g,l){var n=null,q=!1,t={mimeType:a.desc.mimeType,title:a.getTitle()};this.isGoogleRealtimeMimeType(a.desc.mimeType)&&(t.mimeType=this.xmlMimeType,n=a.desc,q=c=!0);a.constructor==DriveFile&&(null==m&&(m=[]),null==a.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==
-a.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));l||(null!=f||h||(f=this.placeholderThumbnail,g=this.placeholderMimeType),null!=f&&null!=g&&(t.thumbnail={image:f,mimeType:g}));var v=mxUtils.bind(this,function(){a.saveDelay=(new Date).getTime()-p;b.apply(this,arguments);null!=n&&(this.executeRequest(gapi.client.drive.revisions.get({fileId:n.id,revisionId:n.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=
+a.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));l||(null!=f||h||(f=this.placeholderThumbnail,g=this.placeholderMimeType),null!=f&&null!=g&&(t.thumbnail={image:f,mimeType:g}));var u=mxUtils.bind(this,function(){a.saveDelay=(new Date).getTime()-p;b.apply(this,arguments);null!=n&&(this.executeRequest(gapi.client.drive.revisions.get({fileId:n.id,revisionId:n.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=
!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:n.id,revisionId:n.headRevisionId,resource:a}))}))),EditorUi.logEvent({category:"RT-CONVERT-"+a.convertedFrom,action:"from-"+n.id+"."+n.headRevisionId+"-to-"+a.desc.id+"."+a.desc.headRevisionId+"-",label:null!=this.user?this.user.id:"unknown-user"}))}),x=mxUtils.bind(this,function(b,f){null!=m&&(t.properties=m);var g=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),h=0,l=mxUtils.bind(this,
-function(k){var n=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),t,b,c||k||n,f,k?null:g,q),v,mxUtils.bind(this,function(b){a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){if(null!=c&&c.etag==g)if(h<this.maxRetries)h++,window.setTimeout(l,2*h*this.coolOff*(1+.1*(Math.random()-
+function(k){var n=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),t,b,c||k||n,f,k?null:g,q),u,mxUtils.bind(this,function(b){a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){if(null!=c&&c.etag==g)if(h<this.maxRetries)h++,window.setTimeout(l,2*h*this.coolOff*(1+.1*(Math.random()-
.5)));else{l(!0);try{EditorUi.sendReport("Warning: Stale Etag Overwrite "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(a.getId())+"\nUser="+(null!=this.user?this.ui.hashValue(this.user.id):"unknown")),EditorUi.logError("Warning: Stale Etag Overwrite",null,a.desc.id+"."+a.desc.headRevisionId,null!=this.user?this.user.id:"unknown")}catch(D){}}else null!=d&&d(b,c)}),mxUtils.bind(this,function(){null!=d&&d(b)})):d(b)}))});l(!1)});this.ui.useCanvasForExport&&
/(\.png)$/i.test(a.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){x(a,!0)}),d,this.ui.getCurrentFile()!=a?a.getData():null):x(a.getData(),!1)}),l=mxUtils.bind(this,function(){!h&&a.constructor!=DriveLibrary&&this.enableThumbnails&&"0"!=urlParams.thumb&&this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(t){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,
"_");g(b,"image/png")}))||g(null,null,a.constructor!=DriveLibrary)});f||!c?l():this.verifyMimeType(a.getId(),l,!0)}else this.ui.editor.graph.reset(),null!=d&&d({message:mxResources.get("readOnly")})};
@@ -8427,15 +8451,19 @@ OneDriveFile.prototype.saveFile=function(a,c,b,d,f,h){if(!this.isEditable())null
mxUtils.bind(this,function(a){this.isModified=l;this.savingFile=!1;this.meta=a;this.fileSaved(c,f,mxUtils.bind(this,function(){this.contentChanged();null!=b&&b()}),d)}),mxUtils.bind(this,function(a,b){this.savingFile=!1;this.isModified=l;this.setModified(n||this.isModified());if(this.isConflict(b))this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k()}),100+500*Math.random())}),
mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))):null!=d&&d();else if(null!=d){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){q();c()}}d(a)}}),a)});k()}else this.savingFile=!0,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}))};
OneDriveFile.prototype.rename=function(a,c,b){var d=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(f){this.hasSameExtension(a,this.getTitle())?(this.meta=f,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(d),null!=c&&c(f)):(this.meta=f,null!=this.sync&&this.sync.descriptorChanged(d),this.save(!0,c,b))}),b)};
-OneDriveFile.prototype.move=function(a,c,b){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=c&&c(a)}),b)};OneDriveLibrary=function(a,c,b){OneDriveFile.call(this,a,c,b)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};OneDriveLibrary.prototype.open=function(){};OneDriveClient=function(a){DrawioClient.call(this,a,"odauth");this.token=this.token};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId="test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395";OneDriveClient.prototype.scopes="user.read files.readwrite.all";OneDriveClient.prototype.redirectUri="https://"+window.location.hostname+"/onedrive3.html";OneDriveClient.prototype.extension=".html";
-OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.get=function(a,c,b){a=new mxXmlRequest(a,null,"GET");a.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Authorization","Bearer "+this.token)});a.send(c,b);return a};
+OneDriveFile.prototype.move=function(a,c,b){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=c&&c(a)}),b)};OneDriveLibrary=function(a,c,b){OneDriveFile.call(this,a,c,b)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.doSave=function(a,c,b){this.saveFile(a,!1,c,b)};OneDriveLibrary.prototype.open=function(){};OneDriveClient=function(a){DrawioClient.call(this,a,"oneDriveAuthInfo");a=JSON.parse(this.token);null!=a&&(this.token=a.access_token,this.endpointHint=a.endpointHint,this.tokenExpiresOn=a.expiresOn,a=(this.tokenExpiresOn-Date.now())/1E3,this.resetTokenRefresh(600>a?1:a))};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId="test.draw.io"==window.location.hostname?"c36dee60-2c6d-4b5f-b552-a7d21798ea52":"45c10911-200f-4e27-a666-9e9fca147395";
+OneDriveClient.prototype.scopes="user.read files.readwrite.all offline_access";OneDriveClient.prototype.redirectUri="https://"+window.location.hostname+"/microsoft";OneDriveClient.prototype.pickerRedirectUri="https://"+window.location.hostname+"/onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;OneDriveClient.prototype.extension=".html";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";
+OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.get=function(a,c,b){a=new mxXmlRequest(a,null,"GET");a.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Authorization","Bearer "+this.token)});a.send(c,b);return a};
OneDriveClient.prototype.updateUser=function(a,c,b){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(h){window.clearTimeout(f);d&&(200>h.getStatus()||300<=h.getStatus()?b?c({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,c,!0)}),c)):(h=JSON.parse(h.getText()),this.setUser(new DrawioUser(h.id,null,h.displayName)),
-a()))}),c)};
-OneDriveClient.prototype.authenticate=function(a,c){if(null==window.onOneDriveCallback){var b=mxUtils.bind(this,function(){var d=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(f,h){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=token&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&response_mode=fragment",k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+
-Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,p){if(d){window.onOneDriveCallback=null;d=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:b}):(null!=h&&h(),this.setUser(null),this.token=k,f&&this.setPersistentToken(k),a())}catch(g){c(g)}finally{null!=p&&p.close()}}else null!=p&&p.close()}),k.focus())}),
-mxUtils.bind(this,function(){d&&(window.onOneDriveCallback=null,d=!1,c({message:mxResources.get("accessDenied"),retry:b}))}))});b()}else c({code:App.ERROR_BUSY})};
-OneDriveClient.prototype.executeRequest=function(a,c,b){var d=mxUtils.bind(this,function(h){var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;b({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(m);k&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?c(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,h?b({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
-function(){this.authenticate(function(){f(!0)},b)})}):this.authenticate(function(){d(!0)},b)):b(this.parseRequestText(a)))}),b)}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},b,a):d(a)});null==this.token?this.authenticate(function(){f(!0)},b):f(!1)};OneDriveClient.prototype.getItemRef=function(a){var c=a.split("/");return 1<c.length?{driveId:c[0],id:c[1]}:{id:a}};
+a()))}),c)};OneDriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<a&&(this.tokenRefreshInterval=1E3*a,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*a))};
+OneDriveClient.prototype.authenticate=function(a,c,b){if(null==window.onOneDriveCallback){var d=mxUtils.bind(this,function(){var f=!0,h=JSON.parse(this.getPersistentToken(!0));null!=h?(new mxXmlRequest(this.redirectUri+"?refresh_token="+h.refresh_token,null,"GET")).send(mxUtils.bind(this,function(f){200<=f.getStatus()&&299>=f.getStatus()?(f=JSON.parse(f.getText()),this.token=f.access_token,f.access_token=f.access_token,f.refresh_token=f.refresh_token,f.expiresOn=Date.now()+1E3*f.expires_in,this.tokenExpiresOn=
+f.expiresOn,this.setPersistentToken(JSON.stringify(f),!f.remember),this.resetTokenRefresh(f.expires_in),a()):(this.clearPersistentToken(),this.setUser(null),this.token=null,401!=f.getStatus()||b?c({message:mxResources.get("accessDenied"),retry:d}):d())}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,h){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes),
+k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=mxUtils.bind(this,function(g,k){if(f){window.onOneDriveCallback=null;f=!1;try{null==g?c({message:mxResources.get("accessDenied"),retry:d}):(null!=h&&h(),this.setUser(null),this.token=g.access_token,g.expiresOn=Date.now()+1E3*
+g.expires_in,this.tokenExpiresOn=g.expiresOn,g.remember=b,this.setPersistentToken(JSON.stringify(g),!b),this.resetTokenRefresh(g.expires_in),this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){a()}),c))}catch(n){c(n)}finally{null!=k&&k.close()}}else null!=k&&k.close()}),k.focus())}),mxUtils.bind(this,function(){f&&(window.onOneDriveCallback=null,f=!1,c({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else c({code:App.ERROR_BUSY})};
+OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,c){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(b){try{if(200<=b.getStatus()&&299>=b.getStatus()){var d=JSON.parse(b.getText());0<d.webUrl.indexOf(".sharepoint.com")?this.endpointHint=d.webUrl:this.endpointHint=this.defEndpointHint;var f=JSON.parse(this.getPersistentToken(!0));null!=f&&(f.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(f),!f.remember));a();return}}catch(h){}c({message:mxResources.get("unknownError")+
+" (Code: "+b.getStatus()+")"})}),c)};
+OneDriveClient.prototype.executeRequest=function(a,c,b){var d=mxUtils.bind(this,function(f){var h=!0,k=window.setTimeout(mxUtils.bind(this,function(){h=!1;b({code:App.ERROR_TIMEOUT,retry:fn})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(k);h&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),c(a)):401===a.getStatus()||400===a.getStatus()?this.authenticate(function(){d(!0)},b,f):b(this.parseRequestText(a)))}),
+b)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){d(!0)},b):d(!1)};OneDriveClient.prototype.checkToken=function(a){null==this.token||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(a,this.emptyFn):a()};OneDriveClient.prototype.getItemRef=function(a){var c=a.split("/");return 1<c.length?{driveId:c[0],id:c[1]}:{id:a}};
OneDriveClient.prototype.getItemURL=function(a,c){var b=a.split("/");return 1<b.length?(c?"":this.baseUrl)+"/drives/"+b[0]+"/items/"+b[1]:(c?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,c,b){this.getFile(a,c,b,!1,!0)};
OneDriveClient.prototype.getFile=function(a,c,b,d,f){f=null!=f?f:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var d=JSON.parse(a.getText()),h=/\.png$/i.test(d.name);if(/\.v(dx|sdx?)$/i.test(d.name)||/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&h)this.ui.convertFile(d["@microsoft.graph.downloadUrl"],d.name,null!=d.file?d.file.mimeType:null,this.extension,c,b);else{var p=!0,g=window.setTimeout(mxUtils.bind(this,function(){p=
!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(d["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(g);if(p){var b=h?a.lastIndexOf(","):-1,k=null;0<b?(b=this.ui.extractGraphModelFromPng(a.substring(b+1)),null!=b&&0<b.length?a=b:k=new LocalFile(this.ui,a,d.name,!0)):"data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)&&(a=a.substring(22),a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a));null!=k?c(k):f?c(new OneDriveLibrary(this.ui,a,d)):c(new OneDriveFile(this.ui,
@@ -8444,12 +8472,14 @@ OneDriveClient.prototype.moveFile=function(a,c,b,d){c=this.getItemRef(c);var f=t
OneDriveClient.prototype.insertFile=function(a,c,b,d,f,h){f=null!=f?f:!1;this.checkExists(h,a,!0,mxUtils.bind(this,function(k){k?(k="/me/drive/root",null!=h&&(k=this.getItemURL(h,!0)),this.writeFile(this.baseUrl+k+"/children/"+a+"/content",c,"PUT",null,mxUtils.bind(this,function(a){f?b(new OneDriveLibrary(this.ui,c,a)):b(new OneDriveFile(this.ui,c,a))}),d)):d()}))};
OneDriveClient.prototype.checkExists=function(a,c,b,d){var f="/me/drive/root";null!=a&&(f=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+f+"/children/"+c,mxUtils.bind(this,function(a){404==a.getStatus()?d(!0):b?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[c]),function(){d(!0)},function(){d(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)}))}),function(a){d(!1)},!0)};
OneDriveClient.prototype.saveFile=function(a,c,b,d){var f=mxUtils.bind(this,function(f){var h=this.getItemURL(a.getId())+"/content/";this.writeFile(h,f,"PUT",null,c,b,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=a?a.getData():null):f(a.getData())};
-OneDriveClient.prototype.writeFile=function(a,c,b,d,f,h,k){if(null!=a&&null!=c){var m=mxUtils.bind(this,function(g){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;h({code:App.ERROR_TIMEOUT,retry:p})}),this.ui.timeout),q=new mxXmlRequest(a,c,b);q.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});q.send(mxUtils.bind(this,function(a){window.clearTimeout(n);
-l&&(200<=a.getStatus()&&299>=a.getStatus()?f(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,g?h({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},h)})}):this.authenticate(function(){m(!0)},h)):h(this.parseRequestText(a),a))}),mxUtils.bind(this,function(a){window.clearTimeout(n);l&&h(this.parseRequestText(a))}))}),p=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){p(!0)},
-h,a):m(a)});null==this.token?this.authenticate(function(){p(!0)},h):p(!1)}else h({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(b){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})};
-OneDriveClient.prototype.pickFolder=function(a){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{redirectUri:this.redirectUri,queryParameters:"select=id,name,parentReference"},success:mxUtils.bind(this,function(c){this.token=c.accessToken;a(c)}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})};
-OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{redirectUri:this.redirectUri,queryParameters:"select=id,name,parentReference"},success:mxUtils.bind(this,function(c){null!=c&&null!=c.value&&0<c.value.length&&(this.token=c.accessToken,a(OneDriveFile.prototype.getIdOf(c.value[0]),c))}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),
-a)})})};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var a=localStorage.getItem("odpickerv7cache");null!=a&&'{"odsdkLoginHint":{'==a.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}this.clearPersistentToken();this.setUser(null);this.token=null};GitHubFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};
+OneDriveClient.prototype.writeFile=function(a,c,b,d,f,h,k){if(null!=a&&null!=c){var m=mxUtils.bind(this,function(p){var g=!0,l=window.setTimeout(mxUtils.bind(this,function(){g=!1;h({code:App.ERROR_TIMEOUT,retry:fn})}),this.ui.timeout),n=new mxXmlRequest(a,c,b);n.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",d||" ");a.setRequestHeader("Authorization","Bearer "+this.token);null!=k&&a.setRequestHeader("If-Match",k)});n.send(mxUtils.bind(this,function(a){window.clearTimeout(l);
+g&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(JSON.parse(a.getText()))):401===a.getStatus()?this.authenticate(function(){m(!0)},h,p):h(this.parseRequestText(a),a))}),mxUtils.bind(this,function(a){window.clearTimeout(l);g&&h(this.parseRequestText(a))}))});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){m(!0)},h):m(!1)}else h({message:mxResources.get("unknownError")})};
+OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(b){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(c){a(c)})};
+OneDriveClient.prototype.pickFolder=function(a,c){var b=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){a(b);mxClient.IS_IE11&&(this.token=b.accessToken)}),cancel:mxUtils.bind(this,function(){}),
+error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})});b?c():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){a({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),c,mxResources.get("yes"),mxResources.get("no"));null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){b(!1)}),this.emptyFn):b(c)};
+OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});var c=mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){null!=b&&null!=b.value&&0<b.value.length&&
+(mxClient.IS_IE11&&(this.token=b.accessToken),a(OneDriveFile.prototype.getIdOf(b.value[0]),b))}),cancel:mxUtils.bind(this,function(){}),error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){c();this.ui.hideDialog()}))).container,
+300,140,!0,!0)}),this.emptyFn):c()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var a=localStorage.getItem("odpickerv7cache");null!=a&&'{"odsdkLoginHint":{'==a.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}this.clearPersistentToken();this.setUser(null);this.token=null};GitHubFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};
GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(c){a(200<=c.getStatus()&&299>=c.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.isConflict=function(a){return null!=a&&409==a.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(a,c){this.ui.gitHub.getFile(this.getId(),a,c)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(a){this.meta=a};GitHubFile.prototype.getDescriptorEtag=function(a){return a.sha};GitHubFile.prototype.setDescriptorEtag=function(a,c){a.sha=c};GitHubFile.prototype.save=function(a,c,b,d,f,h){this.doSave(this.getTitle(),c,b,d,f,h)};
GitHubFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};GitHubFile.prototype.doSave=function(a,c,b,d,f,h){var k=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=k;this.saveFile(a,!1,c,b,d,f,h)};
@@ -8476,16 +8506,16 @@ GitHubClient.prototype.saveFile=function(a,c,b,d,f){var h=a.meta.org,k=a.meta.re
Base64.encode(a.getData()))});d?this.getFile(h+"/"+k+"/"+encodeURIComponent(m)+"/"+p,mxUtils.bind(this,function(b){a.meta.sha=b.meta.sha;l()}),b):l()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
GitHubClient.prototype.showGitHubDialog=function(a,c){var b=null,d=null,f=null,h=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,mxResources.get(a?"selectFile":"selectFolder"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.overflow="auto";p.style.height="194px";
k.appendChild(p);var g=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){c(b+"/"+d+"/"+encodeURIComponent(f)+"/"+h)}));this.ui.showDialog(g.container,340,270,!0,!0);a&&g.okButton.parentNode.removeChild(g.okButton);var l=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),n=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(l(b+
-"/"+d,mxUtils.bind(this,function(){h=null;v()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(f),mxUtils.bind(this,function(){h=null;y()}))));if(null!=h&&0<h.length){var g=h.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(g[a],mxUtils.bind(this,function(){h=g.slice(0,a+1).join("/");t()})))})(a)}p.appendChild(c)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
-(h=f=d=b=null,v()):this.ui.hideDialog()}))}),t=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+h+"?ref="+encodeURIComponent(f),null,"GET");g.okButton.removeAttribute("disabled");p.innerHTML="";this.ui.spinner.spin(p,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(g){n();this.ui.spinner.stop();var k=JSON.parse(g.getText());p.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==h)h=null,v();else{var a=h.split("/");
-h=a.slice(0,a.length-1).join("/");t()}})));mxUtils.br(p);null==k||0==k.length?mxUtils.write(p,mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var n=0;n<k.length;n++)mxUtils.bind(this,function(k){g==("dir"==k.type)&&(p.appendChild(l(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(h=k.path,t()):a&&"file"==k.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+encodeURIComponent(f)+"/"+k.path))}))),mxUtils.br(p))})(k[n])}),g(!0),a&&g(!1))}),q)}),u=null,w=null,y=mxUtils.bind(this,
-function(a){null==a&&(p.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/branches?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(p,mxResources.get("loading"));null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(p,
-"scroll",w);y(a+1)});mxEvent.addListener(u,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),p.appendChild(l("../ [Up]",mxUtils.bind(this,function(){h=null;v()}))),mxUtils.br(p));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(p,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){p.appendChild(l(a.name,mxUtils.bind(this,function(){f=a.name;h="";t()})));mxUtils.br(p)})(b[c]);100==b.length&&(p.appendChild(u),
-w=function(){p.scrollTop>=p.scrollHeight-p.offsetHeight&&k()},mxEvent.addListener(p,"scroll",w))}}),q)}),v=mxUtils.bind(this,function(a){null==a&&(p.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(p,mxResources.get("loading"));null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");
-mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(p,"scroll",w);v(a+1)});mxEvent.addListener(u,"click",k);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(p,mxResources.get("noFiles"));else{1==a&&(p.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
+"/"+d,mxUtils.bind(this,function(){h=null;u()})));a||(mxUtils.write(c," / "),c.appendChild(l(decodeURIComponent(f),mxUtils.bind(this,function(){h=null;y()}))));if(null!=h&&0<h.length){var g=h.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(c," / ");c.appendChild(l(g[a],mxUtils.bind(this,function(){h=g.slice(0,a+1).join("/");t()})))})(a)}p.appendChild(c)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
+(h=f=d=b=null,u()):this.ui.hideDialog()}))}),t=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+h+"?ref="+encodeURIComponent(f),null,"GET");g.okButton.removeAttribute("disabled");p.innerHTML="";this.ui.spinner.spin(p,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(g){n();this.ui.spinner.stop();var k=JSON.parse(g.getText());p.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==h)h=null,u();else{var a=h.split("/");
+h=a.slice(0,a.length-1).join("/");t()}})));mxUtils.br(p);null==k||0==k.length?mxUtils.write(p,mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var n=0;n<k.length;n++)mxUtils.bind(this,function(k){g==("dir"==k.type)&&(p.appendChild(l(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(h=k.path,t()):a&&"file"==k.type&&(this.ui.hideDialog(),c(b+"/"+d+"/"+encodeURIComponent(f)+"/"+k.path))}))),mxUtils.br(p))})(k[n])}),g(!0),a&&g(!1))}),q)}),v=null,w=null,y=mxUtils.bind(this,
+function(a){null==a&&(p.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/branches?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(p,mxResources.get("loading"));null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(p,
+"scroll",w);y(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),p.appendChild(l("../ [Up]",mxUtils.bind(this,function(){h=null;u()}))),mxUtils.br(p));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(p,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){p.appendChild(l(a.name,mxUtils.bind(this,function(){f=a.name;h="";t()})));mxUtils.br(p)})(b[c]);100==b.length&&(p.appendChild(v),
+w=function(){p.scrollTop>=p.scrollHeight-p.offsetHeight&&k()},mxEvent.addListener(p,"scroll",w))}}),q)}),u=mxUtils.bind(this,function(a){null==a&&(p.innerHTML="",a=1);var c=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(p,mxResources.get("loading"));null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");
+mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(p,"scroll",w);u(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(p,mxResources.get("noFiles"));else{1==a&&(p.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
function(a){if(null!=a){var c=a.split("/");if(1<c.length){a=c[0];var g=c[1];3>c.length?(b=a,d=g,h=f=null,y()):this.ui.spinner.spin(p,mxResources.get("loading"))&&(c=encodeURIComponent(c.slice(2,c.length).join("/")),this.getFile(a+"/"+g+"/"+c,mxUtils.bind(this,function(a){this.ui.spinner.stop();b=a.meta.org;d=a.meta.repo;f=decodeURIComponent(a.meta.ref);h="";t()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),
-this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(p),mxUtils.br(p));for(var g=0;g<c.length;g++)mxUtils.bind(this,function(a){p.appendChild(l(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;d=a.name;f=a.default_branch;h="";t()})));mxUtils.br(p)})(c[g])}100==c.length&&(p.appendChild(u),w=function(){p.scrollTop>=p.scrollHeight-p.offsetHeight&&k()},mxEvent.addListener(p,"scroll",
-w))}),q)});v()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(p),mxUtils.br(p));for(var g=0;g<c.length;g++)mxUtils.bind(this,function(a){p.appendChild(l(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;d=a.name;f=a.default_branch;h="";t()})));mxUtils.br(p)})(c[g])}100==c.length&&(p.appendChild(v),w=function(){p.scrollTop>=p.scrollHeight-p.offsetHeight&&k()},mxEvent.addListener(p,"scroll",
+w))}),q)});u()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,c,b){DrawioFile.call(this,a,c);this.meta=b;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(a,c,b){this.doSave(this.getTitle(),c,b)};TrelloFile.prototype.saveAs=function(a,c,b){this.doSave(a,c,b)};TrelloFile.prototype.doSave=function(a,c,b){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,c,b)};
TrelloFile.prototype.saveFile=function(a,c,b,d){if(this.isEditable())if(this.savingFile)null!=d&&(this.saveNeededCounter++,d({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.getTitle()==a){var f=this.isModified,h=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return h}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(h){this.savingFile=!1;this.isModified=f;this.meta=h;this.contentChanged();null!=b&&b();0<this.saveNeededCounter&&
(this.saveNeededCounter--,this.saveFile(a,c,b,d))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;this.setModified(h||this.isModified());if(null!=d){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}d(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(f){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(f){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(f);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,
@@ -8504,14 +8534,14 @@ TrelloClient.prototype.showTrelloDialog=function(a,c){var b=null,d="@me",f=0,h=d
"194px";h.appendChild(m);h=new CustomDialog(this.ui,h);this.ui.showDialog(h.container,340,270,!0,!0);h.okButton.parentNode.removeChild(h.okButton);var p=mxUtils.bind(this,function(a,b,c){f++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==f%2?"#eee":"#fff");var g=document.createElement("a");g.setAttribute("href","javascript:void(0);");if(null!=c){var h=document.createElement("img");h.src=c.url;h.width=c.width;h.height=
c.height;h.style="border: 1px solid black;margin:5px;vertical-align:middle";g.appendChild(h)}mxUtils.write(g,a);mxEvent.addListener(g,"click",b);d.appendChild(g);return d}),g=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),l=mxUtils.bind(this,function(){f=0;m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(b+"/attachments",{fields:"id,name,previews"},
mxUtils.bind(this,function(a){this.ui.spinner.stop();m.appendChild(p("../ [Up]",mxUtils.bind(this,function(){t()})));mxUtils.br(m);null==a||0==a.length?mxUtils.write(m,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){m.appendChild(p(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();c(b+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[d])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,g,!0):
-null!=g&&g(b)}))});a()}),n=null,q=null,t=mxUtils.bind(this,function(h){null==h&&(f=0,m.innerHTML="",h=1);this.ui.spinner.spin(m,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",q);t(h+1)});mxEvent.addListener(n,"click",k);var u=mxUtils.bind(this,function(){Trello.get("search",
+null!=g&&g(b)}))});a()}),n=null,q=null,t=mxUtils.bind(this,function(h){null==h&&(f=0,m.innerHTML="",h=1);this.ui.spinner.spin(m,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",q);t(h+1)});mxEvent.addListener(n,"click",k);var v=mxUtils.bind(this,function(){Trello.get("search",
{query:""==mxUtils.trim(d)?"is:open":d,cards_limit:100,cards_page:h-1},mxUtils.bind(this,function(f){this.ui.spinner.stop();f=null!=f?f.cards:null;if(null==f||0==f.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==h&&(m.appendChild(p(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,d,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(d=a,t())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m));for(var g=0;g<f.length;g++)mxUtils.bind(this,function(d){m.appendChild(p(d.name,mxUtils.bind(this,function(){a?(b=d.id,l()):(this.ui.hideDialog(),c(d.id))})))})(f[g]);100==f.length&&(m.appendChild(n),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(u,g,!0):null!=g&&g({message:a.responseText})}))});u()});t()};
+this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m));for(var g=0;g<f.length;g++)mxUtils.bind(this,function(d){m.appendChild(p(d.name,mxUtils.bind(this,function(){a?(b=d.id,l()):(this.ui.hideDialog(),c(d.id))})))})(f[g]);100==f.length&&(m.appendChild(n),q=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(v,g,!0):null!=g&&g({message:a.responseText})}))});v()});t()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};App=function(a,c,b){EditorUi.call(this,a,c,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var d=null;try{d=window.open(a)}catch(m){}null==d||void 0===d?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";
-App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";
-App.GOOGLE_APIS="client,drive-share";
+App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";
+App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";App.GOOGLE_APIS="client,drive-share";
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",ac148:"/plugins/cConf-1-4-8.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js",
"import":"/plugins/import.js",replay:"/plugins/replay.js",anon:"/plugins/anonymize.js",tr:"/plugins/trello.js",f5:"/plugins/rackF5.js",tickets:"/plugins/tickets.js",flow:"/plugins/flow.js",webcola:"/plugins/webcola/webcola.js",rnd:"/plugins/random.js",page:"/plugins/page.js"};
App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var c=document.cookie.split(";"),b=0;b<c.length;b++){var d=mxUtils.trim(c[b]);if("MODE="==d.substring(0,5)){a=d.substring(5);break}}null!=a&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie="MODE=; expires="+c.toUTCString(),localStorage.setItem(".mode",a))}return a};
@@ -8528,7 +8558,7 @@ urlParams.embed||"1"==urlParams.lightbox){var f=document.getElementById("geInfo"
DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var f=null!=mxSettings.settings?mxSettings.getPlugins():null,h={},k=urlParams.p;App.initPluginCallback();if(null!=k)for(var m=k.split(";"),k=0;k<m.length;k++){var p=App.pluginRegistry[m[k]];null!=p&&null==h[p]?(h[p]=!0,"undefined"===typeof window.drawDevUrl?mxscript(p):mxscript(drawDevUrl+p)):null!=window.console&&console.log("Unknown plugin:",m[k])}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
null,null,null,mxClient.IS_SVG);if(null!=f&&0<f.length&&"0"!=urlParams.plugins){for(var m=window.location.protocol+"//"+window.location.host,g=!0,k=0;k<f.length&&g;k++)"/"!=f[k].charAt(0)&&f[k].substring(0,m.length)!=m&&(g=!1);if(g||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[f.join("\n")]).replace(/\\n/g,
"\n")))for(k=0;k<f.length;k++)try{null==h[f[k]]&&(h[p]=!0,mxscript(f[k]))}catch(q){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&
-Editor.initMath();if("1"==urlParams.configure){var l=window.opener||window.parent,n=function(a){if(a.source==l)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",n),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",n);l.postMessage(JSON.stringify({event:"load"}),"*")}else d()};mxUtils.extend(App,EditorUi);
+Editor.initMath();if("1"==urlParams.configure){var l=window.opener||window.parent,n=function(a){if(a.source==l)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",n),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(v){null!=window.console&&console.log("Error in configuration: "+v)}};mxEvent.addListener(window,"message",n);l.postMessage(JSON.stringify({event:"load"}),"*")}else d()};mxUtils.extend(App,EditorUi);
App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
IMAGE_PATH+"/chevron-up.png";
@@ -8560,8 +8590,8 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,c=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,b=0;256>b;b++){c=b;for(var d=0;8>d;d++)c=c&1?3988292384^c>>>1:c>>>1;a[b]=c}return a};
App.prototype.getThumbnail=function(a,c){var b=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var d=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,h=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(h.root)}if(mxClient.IS_CHROMEAPP||!d.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
function(a){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,d),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),m=d.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),g=Math.floor(m.x),l=Math.floor(m.y);k.setAttribute("width",Math.ceil(p*(m.width+4)));k.setAttribute("height",Math.ceil(p*(m.height+4)));var n=k.getContext("2d");
-n.scale(p,p);n.translate(-g,-l);var q=d.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";n.save();n.fillStyle=q;n.fillRect(g,l,Math.ceil(m.width+4),Math.ceil(m.height+4));n.restore();var t=new mxJsCanvas(k),u=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var w=new mxImageExport;w.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};w.drawText=function(a,
-b){};w.drawState(d.getView().getState(d.model.root),u);u.finish(mxUtils.bind(this,function(){w.drawState(d.getView().getState(d.model.root),t);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);c(k)}));b=!0}}catch(y){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}return b};
+n.scale(p,p);n.translate(-g,-l);var q=d.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";n.save();n.fillStyle=q;n.fillRect(g,l,Math.ceil(m.width+4),Math.ceil(m.height+4));n.restore();var t=new mxJsCanvas(k),v=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var w=new mxImageExport;w.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};w.drawText=function(a,
+b){};w.drawState(d.getView().getState(d.model.root),v);v.finish(mxUtils.bind(this,function(){w.drawState(d.getView().getState(d.model.root),t);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);c(k)}));b=!0}}catch(y){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}return b};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(c,b){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(b)if(isLocalStorage)localStorage.setItem(".mode",c);else if("undefined"!=typeof Storage){var d=new Date;d.setYear(d.getFullYear()+1);document.cookie="MODE="+c+"; expires="+d.toUTCString()}null!=this.appIcon&&(d=this.getCurrentFile(),c=null!=d?d.getMode():null,c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):c==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):c==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
@@ -8629,8 +8659,8 @@ App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};
App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a,c){c||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(b,c){var d=0,h=[],k=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=h[a]&&this.loadLibrary(h[a]);null!=c&&c()}});if(null!=b)for(var m=0;m<b.length;m++){var p=encodeURIComponent(decodeURIComponent(b[m]));mxUtils.bind(this,
function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){d++;var f=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];h[c]=a;d--;k()}),g=mxUtils.bind(this,function(c){a(b,c);d--;k()});this.pendingLibraries[b]=!0;var l=b.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&
-null==b&&(b=this.emptyLibraryXml);null!=b?f(new StorageLibrary(this,b,a)):g()}))}catch(v){g()}}),0);else if("U"==l){var m=decodeURIComponent(b.substring(1));if(!this.isOffline()){l=m;this.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+l);try{mxUtils.get(l,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{f(new UrlLibrary(this,a.getText(),m))}catch(v){g()}else g()}),function(){g()})}catch(y){g()}}}else{var p=null;"G"==l?
-null!=this.drive&&null!=this.drive.user&&(p=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(p=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(p=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(p=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(p=this.oneDrive);null!=p?p.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{f(a)}catch(v){g()}}),function(a){g()}):g(!0)}}})(p,m)}k()});c(mxSettings.getCustomLibraries(),
+null==b&&(b=this.emptyLibraryXml);null!=b?f(new StorageLibrary(this,b,a)):g()}))}catch(u){g()}}),0);else if("U"==l){var m=decodeURIComponent(b.substring(1));if(!this.isOffline()){l=m;this.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+l);try{mxUtils.get(l,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{f(new UrlLibrary(this,a.getText(),m))}catch(u){g()}else g()}),function(){g()})}catch(y){g()}}}else{var p=null;"G"==l?
+null!=this.drive&&null!=this.drive.user&&(p=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(p=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(p=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(p=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(p=this.oneDrive);null!=p?p.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{f(a)}catch(u){g()}}),function(a){g()}):g(!0)}}})(p,m)}k()});c(mxSettings.getCustomLibraries(),
function(){c((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();if(null!=a&&("manual"==DrawioFile.SYNC||"auto"==DrawioFile.SYNC)){var c=("manual"==DrawioFile.SYNC||null!=a.sync&&!a.sync.enabled&&"min"!=uiTheme)&&(a.constructor==DriveFile||a.constructor==OneDriveFile)||a.constructor==GitHubFile||EditorUi.isElectronApp;null==this.syncButton&&c?(this.syncButton=document.createElement("div"),this.syncButton.className="geBtn gePrimaryBtn",this.syncButton.style.display=
"inline-block",this.syncButton.style.padding="0 10px 0 10px",this.syncButton.style.marginTop="-4px",this.syncButton.style.height="28px",this.syncButton.style.lineHeight="28px",this.syncButton.style.minWidth="0px",this.syncButton.style.cssFloat="left",this.syncButton.setAttribute("title",mxResources.get("synchronize")+" (Alt+Shift+S)"),mxUtils.write(this.syncButton,mxResources.get("synchronize")),mxEvent.addListener(this.syncButton,"click",mxUtils.bind(this,function(){this.actions.get("synchronize").funct()})),
@@ -8638,8 +8668,8 @@ this.buttonContainer.appendChild(this.syncButton)):null==this.syncButton||c||(th
"28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),
this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null)}};
App.prototype.save=function(a,c){var b=this.getCurrentFile(),d=mxResources.get("saving");if(null!=b&&this.spinner.spin(document.body,d)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){b.handleFileSuccess(!0);null!=c&&c()}),f=mxUtils.bind(this,function(a){b.handleFileError(a,!0)});try{a==b.getTitle()?b.save(!0,d,f):b.saveAs(a,d,f)}catch(h){b.handleFileError(h,!0)}}};
-App.prototype.pickFolder=function(a,c,b){b=null!=b?b:!0;var d=this.spinner.pause();b&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){d();if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(b=a.docs[0].id);c(b)}})):b&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){d();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
-c(a))})):b&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){d();c(a)})):b&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){d();c(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.pickFolder=function(a,c,b,d){b=null!=b?b:!0;var f=this.spinner.pause();b&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){f();if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(b=a.docs[0].id);c(b)}})):b&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){f();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
+c(a))}),d):b&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){f();c(a)})):b&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){f();c(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
App.prototype.exportFile=function(a,c,b,d,f,h){f==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(c,d?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):f==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(c,a,h,mxUtils.bind(this,function(a){this.spinner.stop()}),
mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),b,d):f==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(c,d?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,h):f==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(c,a,mxUtils.bind(this,
function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,h,d):f==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(c,d?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,h):f==App.MODE_BROWSER&&(b=mxUtils.bind(this,function(){localStorage.setItem(c,a)}),null==localStorage.getItem(c)?
@@ -8720,70 +8750,70 @@ this.addMenuItems(b,["feedback"],c);this.addMenuItems(b,["support","-"],c);a.isO
mxUtils.bind(this,function(){a.vRuler.setUnit(mxRuler.prototype.INCHES);a.hRuler.setUnit(mxRuler.prototype.INCHES);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),a.actions.addAction("rulerCM",mxUtils.bind(this,function(){a.vRuler.setUnit(mxRuler.prototype.CENTIMETER);a.hRuler.setUnit(mxRuler.prototype.CENTIMETER);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),a.actions.addAction("rulerPixel",mxUtils.bind(this,
function(){a.vRuler.setUnit(mxRuler.prototype.PIXELS);a.hRuler.setUnit(mxRuler.prototype.PIXELS);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c))})));"1"==urlParams.test&&(mxResources.parse("testDevelop=Develop"),mxResources.parse("showBoundingBox=Show bounding box"),mxResources.parse("createSidebarEntry=Create Sidebar Entry"),mxResources.parse("testChecksum=Checksum"),mxResources.parse("testDiff=Diff"),mxResources.parse("testInspect=Inspect"),
mxResources.parse("testShowConsole=Show Console"),mxResources.parse("testXmlImageExport=XML Image Export"),mxResources.parse("testDownloadRtModel=Export RT model"),mxResources.parse("testImportRtModel=Import RT model"),a.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||a.showTextDialog("Create Sidebar Entry","sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');")})),a.actions.addAction("showBoundingBox",
-mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,c=d.view.scale;d.insertVertex(d.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),a.actions.addAction("testChecksum",mxUtils.bind(this,function(){var b=null!=a.pages&&null!=a.getCurrentFile()?a.getCurrentFile().getAnonymizedXmlForPages(a.pages):"",b=new TextareaDialog(a,"Paste Data:",b,function(b){if(0<b.length)try{var c=mxUtils.parseXml(b),d=a.getPagesForNode(c.documentElement,
-"mxGraphModel"),f=a.getHashValueForPages(d);console.log("checksum",d,f);var g=c.getElementsByTagName("*");b={};c={};for(d=0;d<g.length;d++){var h=g[d];null==b[h.id]?b[h.id]=h.id:c[h.id]=h.id}0<c.length&&console.log("duplicates",c)}catch(B){a.handleError(B),console.error(B)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:",
-"",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(E){a.handleError(E),console.error(E)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()}else a.alert("No pages")})),a.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(a,d.getModel())})),a.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=
-new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,f=mxUtils.createXmlDocument(),g=f.createElement("output");f.appendChild(g);f=new mxXmlCanvas2D(g);f.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));f.scale(1/c);var h=0,k=f.save;f.save=function(){h++;k.apply(this,arguments)};var l=f.restore;f.restore=function(){h--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,h);m.apply(this,arguments);mxLog.debug("leaving shape",a,h)};a.drawState(d.getView().getState(d.model.root),
-f);mxLog.show();mxLog.debug(mxUtils.getXml(g));mxLog.debug("stateCounter",h)})),a.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==a.drive?a.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):a.drive.execute(mxUtils.bind(this,function(){var b=prompt("File ID","");if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b+"/realtime?supportsTeamDrives=true",null,
-"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)};c.send(function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.saveLocalFile(c.getText(),"json-"+b+".txt","text/plain"):a.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),a.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():
-mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testChecksum testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=
-new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(A){a.handleError(A,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c);this.addMenuItems(b,["-","testShowConsole"],c)}))));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:
-460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,
-mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,f,g,h,k,l,m,n){a.createHtml(b,c,d,f,g,h,k,l,m,n,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!f){var g=a.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=a.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft=
-"6px";g.appendChild(f);a.document.body.insertBefore(g,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);g.parentNode.removeChild(g)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();
-null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,f,g,h,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,
-!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,f,g,h,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},
-mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,f,g,h,k,l){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(m){a.spinner.stop();m=
-new EmbedDialog(a,'<iframe frameborder="0" style="width:'+k+";height:"+l+';" src="'+a.createLink(b,c,d,f,g,h,m)+'"></iframe>');a.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,a.createLink(b,c,d,f,g,h,k));
-a.showDialog(k.container,440,240,!0,!0);k.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSlides...",function(){a.openLink("https://slidesaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||
-mxClient.IS_CHROMEAPP)g=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});g=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});g.setToggleAction(!0);g.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});
-"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var f=a.createLoadMessage("save");f.xml=c;b&&(f.exit=!0);c=JSON.stringify(f)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},
-a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?
-(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,
-["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=l(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");
-g(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var g=mxUtils.bind(this,function(b,c,f){var g=d.view,h=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,h.x/g.scale-g.translate.x)+4*d.gridSize)),l=d.snap(Math.ceil(Math.max(0,(h.y+h.height)/g.scale-g.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(g){var h=!0,m=mxUtils.bind(this,function(){a.resizeImage(g,b,mxUtils.bind(this,
-function(g,m,n){g=h?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/n)):1;a.importFile(b,c,k,l,Math.round(m*g),Math.round(n*g),f,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),h)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){h=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,l,0,0,f,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),
-l=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},
-c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},c):p&&b.addItem(mxResources.get("trello")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,
-mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){g(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}))).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");
-mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(c);f=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},
-c);"min"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&b.addCheckmark(f,Editor.checkmarkImage)})));g=this.editorUi.actions.addAction("rename...",
-mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):
-null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}}));g.isEnabled=function(){return this.enabled&&f.apply(this,arguments)};g.visible="1"!=urlParams.embed;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=
-b){var c=a.getCopyFilename(b);b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(c,mxUtils.bind(this,function(c){b.desc=c;b.save(!1,mxUtils.bind(this,function(){a.spinner.stop();b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):a.createFile(c,
-a.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&
-b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){a.openLink("https://app.draw.io/")}));a.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){a.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",
-mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleDocs","googleSlides","googleSites"],c)})));var u=function(b,c,d,f){("plantUml"!=
-f||EditorUi.enablePlantUml&&!a.isOffline())&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||"plantUml"==f){var b=new ParseDialog(a,d,f);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,f),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},w=function(a,b,c,f){var g=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(g.x,g.y,b,c),f);a.vertex=!0;d.getModel().beginUpdate();
-try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,f,g,h,k,l,m,n){b=parseInt(b);
-!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,f,g,h,k,!l,m,n)}),!0,null,"svg")}));a.actions.put("insertText",new Action(mxResources.get("text"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(w("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;a.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){d.isEnabled()&&
-!d.isCellLocked(d.getDefaultParent())&&w("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;a.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&w("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;a.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&w("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=
-f;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):u(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);a.insertTemplateEnabled&&!a.isOffline()&&this.addMenuItems(b,["insertTemplate","-"],c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));b.addSeparator(c);y(b,c,["fromText",
-"plantUml","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){y(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var f=0;f<d.length;f++)(function(d){var f=d.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(d.title+
-" ("+mxResources.get(f)+")",null,function(){a.loadFile(d.id)},c)})(d[f]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},
-c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},
-c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=
-b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+
-"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",
-null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+
-"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},
-c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&
-299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(G){a.handleError(G,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);
-mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,
-"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&isLocalStorage&&this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);"1"==urlParams.newTempDlg&&(a.actions.addAction("templates",function(){var b=
-new TemplatesDialog;a.showDialog(b.container,b.width,b.height,!0,!1,null,!1,!0);b.init(a,function(a){console.log(a)},null,null,null,"user",function(a,b){setTimeout(function(){b?a([{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"},{url:"123",
-title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"}]):a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",
-lastModifiedOn:"Yesterday"}]);console.log(b)},1E3)},function(a,b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+
-"Test 4"}])},2E3)},null)}),this.addMenuItem(b,"templates",c))})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,"- pageSetup print - rename save".split(" "),c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],
-c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c);this.addMenuItems(b,["save","-","share"],c);var f=this.addMenuItem(b,"synchronize",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(f,"https://desk.draw.io/support/solutions/articles/16000087947");b.addSeparator(c)}else this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",
-b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||(b.addSeparator(c),f=this.addMenuItem(b,"synchronize",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(f,"https://desk.draw.io/support/solutions/articles/16000087947")),this.addMenuItems(b,["-","save","saveAs"],c),this.addMenuItems(b,["-","rename"],c),a.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
-this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null!=d&&d.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c);this.addMenuItems(b,
-["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a;null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
+mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,c=d.view.scale;d.insertVertex(d.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),a.actions.addAction("testChecksum",mxUtils.bind(this,function(){var b=null!=a.pages&&null!=a.getCurrentFile()?a.getCurrentFile().getAnonymizedXmlForPages(a.pages):"",b=new TextareaDialog(a,"Paste Data:",b,function(b){if(0<b.length)try{"<"!=b.charAt(0)&&(b=d.decompress(b),console.log("xml",
+b));var c=mxUtils.parseXml(b),f=a.getPagesForNode(c.documentElement,"mxGraphModel"),g=a.getHashValueForPages(f);console.log("checksum",f,g);var h=c.getElementsByTagName("*");b={};c={};for(f=0;f<h.length;f++){var k=h[f];null==b[k.id]?b[k.id]=k.id:c[k.id]=k.id}0<c.length&&console.log("duplicates",c)}catch(B){a.handleError(B),console.error(B)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,
+function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:","",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(E){a.handleError(E),console.error(E)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()}else a.alert("No pages")})),a.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(a,d.getModel())})),a.actions.addAction("testXmlImageExport",
+mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,f=mxUtils.createXmlDocument(),g=f.createElement("output");f.appendChild(g);f=new mxXmlCanvas2D(g);f.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));f.scale(1/c);var h=0,k=f.save;f.save=function(){h++;k.apply(this,arguments)};var l=f.restore;f.restore=function(){h--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,h);m.apply(this,arguments);mxLog.debug("leaving shape",
+a,h)};a.drawState(d.getView().getState(d.model.root),f);mxLog.show();mxLog.debug(mxUtils.getXml(g));mxLog.debug("stateCounter",h)})),a.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==a.drive?a.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):a.drive.execute(mxUtils.bind(this,function(){var b=prompt("File ID","");if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+
+b+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)};c.send(function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.saveLocalFile(c.getText(),"json-"+b+".txt","text/plain"):a.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),a.actions.addAction("testShowConsole",
+function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testChecksum testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",
+mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(A){a.handleError(A,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c);this.addMenuItems(b,["-","testShowConsole"],c)}))));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,
+640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+
+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,f,g,h,k,l,m,n){a.createHtml(b,c,d,f,g,h,k,l,m,n,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");
+d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!f){var g=a.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=a.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+
+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);a.document.body.insertBefore(g,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);g.parentNode.removeChild(g)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&
+a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,f,g,h,function(b){a.spinner.stop();
+b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,f,g,h,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);
+b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,f,g,h,k,l){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),
+function(m){a.spinner.stop();m=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+k+";height:"+l+';" src="'+a.createLink(b,c,d,f,g,h,m)+'"></iframe>');a.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,
+a.createLink(b,c,d,f,g,h,k));a.showDialog(k.container,440,240,!0,!0);k.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSlides...",function(){a.openLink("https://slidesaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);
+b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)g=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});g=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});g.setToggleAction(!0);
+g.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var f=a.createLoadMessage("save");f.xml=c;b&&(f.exit=!0);c=JSON.stringify(f)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=
+!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));
+this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE||"undefined"===
+typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=l(b.getTitle());/\.svg$/i.test(b.getTitle())&&
+!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");g(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var g=mxUtils.bind(this,function(b,c,f){var g=d.view,h=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,h.x/g.scale-g.translate.x)+4*d.gridSize)),l=d.snap(Math.ceil(Math.max(0,(h.y+h.height)/g.scale-g.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,
+function(g){var h=!0,m=mxUtils.bind(this,function(){a.resizeImage(g,b,mxUtils.bind(this,function(g,m,n){g=h?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/n)):1;a.importFile(b,c,k,l,Math.round(m*g),Math.round(n*g),f,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),h)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){h=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,
+c,k,l,0,0,f,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),l=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,
+function(){f(a.gitHub)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+
+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){g(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}))).isEnabled=f;this.put("theme",
+new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(c);f=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(f,
+Editor.checkmarkImage);f=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");
+mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&b.addCheckmark(f,Editor.checkmarkImage)})));g=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
+b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}}));g.isEnabled=function(){return this.enabled&&
+f.apply(this,arguments)};g.visible="1"!=urlParams.embed;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=a.getCopyFilename(b);b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(c,mxUtils.bind(this,function(c){b.desc=c;b.save(!1,mxUtils.bind(this,function(){a.spinner.stop();
+b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):a.createFile(c,a.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();
+b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),null,!0)}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){a.openLink("https://app.draw.io/")}));
+a.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){a.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||
+a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleDocs","googleSlides","googleSites"],c)})));var v=function(b,c,d,f){("plantUml"!=f||EditorUi.enablePlantUml&&!a.isOffline())&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||"plantUml"==f){var b=new ParseDialog(a,d,f);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,f),a.showDialog(b.container,620,420,!0,
+!1);b.init()}),c)},w=function(a,b,c,f){var g=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(g.x,g.y,b,c),f);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),
+!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,f,g,h,k,l,m,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,f,g,h,k,!l,m,n)}),!0,null,"svg")}));a.actions.put("insertText",new Action(mxResources.get("text"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(w("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),
+null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;a.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&w("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;a.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&w("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;a.actions.put("insertRhombus",
+new Action(mxResources.get("rhombus"),function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&w("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=f;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);a.insertTemplateEnabled&&
+!a.isOffline()&&this.addMenuItems(b,["insertTemplate","-"],c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));b.addSeparator(c);y(b,c,["fromText","plantUml","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){y(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("openRecent",new Menu(function(b,c){var d=
+a.getRecent();if(null!=d){for(var f=0;f<d.length;f++)(function(d){var f=d.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(d.title+" ("+mxResources.get(f)+")",null,function(){a.loadFile(d.id)},c)})(d[f]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
+null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+
+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,
+80,!0,!0);b.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,
+null,null,null,App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,
+null,App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,
+null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):k&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},
+c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=
+b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(G){a.handleError(G,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},
+mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline",
+"layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
+c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);
+"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&isLocalStorage&&this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);"1"==urlParams.newTempDlg&&(a.actions.addAction("templates",function(){var b=new TemplatesDialog;a.showDialog(b.container,b.width,b.height,!0,!1,null,!1,!0);b.init(a,function(a){console.log(a)},null,null,null,"user",function(a,b){setTimeout(function(){b?a([{url:"123",
+title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"},{url:"123",title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"}]):a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},{url:"123",
+title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"}]);console.log(b)},1E3)},function(a,b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",
+title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"}])},2E3)},null)}),this.addMenuItem(b,"templates",c))})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",
+b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,"- pageSetup print - rename save".split(" "),c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],
+c);this.addMenuItems(b,["save","-","share"],c);var f=this.addMenuItem(b,"synchronize",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(f,"https://desk.draw.io/support/solutions/articles/16000087947");b.addSeparator(c)}else this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==
+d||d.constructor==LocalFile||(b.addSeparator(c),f=this.addMenuItem(b,"synchronize",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(f,"https://desk.draw.io/support/solutions/articles/16000087947")),this.addMenuItems(b,["-","save","saveAs"],c),this.addMenuItems(b,["-","rename"],c),a.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));
+b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null!=d&&d.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a;null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
function RenamePage(a,c,b){this.ui=a;this.page=c;this.previous=this.name=b}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,c,b){this.ui=a;this.oldIndex=c;this.newIndex=b}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,c,b){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=b&&(c.viewState=b,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,c=this.ui.editor,b=c.graph,d=c.graph.compress(b.zapGremlins(mxUtils.getXml(c.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=b.getViewState();a.root=b.model.root;null!=a.model&&a.model.rootChanged(a.root);b.view.clear(a.root,!0);b.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;b.model.rootChanged(a.root);
@@ -8839,38 +8869,38 @@ mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prot
a)?b:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,f));return f};a.beforeDecode=function(a,c,f){f.ui=a.ui;f.relatedPage=f.ui.getPageById(c.getAttribute("relatedPage"));if(null==f.relatedPage){var b=c.ownerDocument.createElement("diagram");b.setAttribute("id",c.getAttribute("relatedPage"));b.setAttribute("name",c.getAttribute("name"));f.relatedPage=new DiagramPage(b);b=c.getAttribute("viewState");null!=b&&(f.relatedPage.viewState=JSON.parse(b),c.removeAttribute("viewState"));
c=c.cloneNode(!0);b=c.firstChild;if(null!=b)for(f.relatedPage.root=a.decodeCell(b,!1),f=b.nextSibling,b.parentNode.removeChild(b),b=f;null!=b;){f=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var d=b.getAttribute("id");null==a.lookup(d)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=f}}return c};a.afterDecode=function(a,c,f){f.index=f.previousIndex;return f};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,d,m,p){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var f=d.slice(),h=[],k=0;k<d.length;k++){var q=this.view.getState(d[k]),t=null!=q?q.style:this.getCellStyle(d[k]);"1"==mxUtils.getValue(t,"treeFolding","0")&&(this.traverse(d[k],!0,mxUtils.bind(this,function(a,b){null!=b&&h.push(b);a!=d[k]&&h.push(a);return a==d[k]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(d[k],a))}for(k=0;k<h.length;k++)this.model.setVisible(h[k],!a);d=f;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b="tree"==(null!=
-b?b.style:u.getCellStyle(a)).containerType);return b}function d(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b=null!=(null!=b?b.style:u.getCellStyle(a)).childLayout);return b}function m(a){a=u.view.getState(a);if(null!=a){var b=u.getIncomingEdges(a.cell);if(0<b.length&&(b=u.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
-a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function p(a,b){b=null!=b?b:!0;u.model.beginUpdate();try{var c=u.model.getParent(a),d=u.getIncomingEdges(a),f=u.cloneCells([d[0],a]);u.model.setTerminal(f[0],u.model.getTerminal(d[0],!0),!0);var g=m(a),h=c.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-
-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;u.view.currentRoot!=c&&(f[1].geometry.x-=h.x,f[1].geometry.y-=h.y);var k=u.view.getState(a),l=u.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*l;var p=u.getOutgoingEdges(u.model.getTerminal(d[0],!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||
-g==mxConstants.DIRECTION_NORTH,w=h=d=0;w<p.length;w++){var t=u.model.getTerminal(p[w],!1);if(g==m(t)){var v=u.view.getState(t);t!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,v)&&(d=10+Math.max(d,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/l),h=10+Math.max(h,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/l))}}q?h=0:d=0;for(w=0;w<p.length;w++)if(t=u.model.getTerminal(p[w],!1),g==m(t)&&(v=u.view.getState(t),t!=a&&null!=
-v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY()))){var x=[];u.traverse(v.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});u.moveCells(x,(b?1:-1)*d,(b?1:-1)*h)}}}return u.addCells(f,c)}finally{u.model.endUpdate()}}function g(a){u.model.beginUpdate();try{var b=m(a),c=u.getIncomingEdges(a),d=u.cloneCells([c[0],a]);u.model.setTerminal(c[0],d[1],!1);u.model.setTerminal(d[0],d[1],!0);u.model.setTerminal(d[0],a,!1);var f=u.model.getParent(a),g=f.geometry,h=[];u.view.currentRoot!=
-f&&(d[1].geometry.x-=g.x,d[1].geometry.y-=g.y);u.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);u.moveCells(h,k,l);return u.addCells(d,f)}finally{u.model.endUpdate()}}function l(a){u.model.beginUpdate();try{var b=u.model.getParent(a),c=u.getIncomingEdges(a),d=u.cloneCells([c[0],
-a]);u.model.setTerminal(d[0],a,!0);var c=u.getOutgoingEdges(a),f=b.geometry,g=[];u.view.currentRoot==b&&(f=new mxRectangle);for(var h=0;h<c.length;h++){var k=u.model.getTerminal(c[h],!1);null!=k&&g.push(k)}var l=u.view.getBounds(g),n=m(a),p=u.view.translate,q=u.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
-null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-f.x+40):d[1].geometry.x+(a.geometry.width-f.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/q-p.y+-f.y+10);return u.addCells(d,b)}finally{u.model.endUpdate()}}function n(a,b,c){a=u.getOutgoingEdges(a);c=u.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var f=0;f<a.length;f++){var g=u.view.getState(u.model.getTerminal(a[f],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.actions.get("selectParent").funct():
-c==b?(d=u.getOutgoingEdges(a),null!=d&&0<d.length&&u.setSelectionCell(u.model.getTerminal(d[0],!1))):(c=u.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(u.model.getTerminal(c[0],!0),d,a),c=u.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&u.setSelectionCell(d[c].cell)))))}var t=this,u=t.editor.graph,w=u.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
-mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var y=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==u.getSelectionCount()){c=u.getSelectionCell();var f=u.getOutgoingEdges(c);a.addSeparator();null!=f&&0<f.length&&(b(u.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(u.getSelectionCell())&&(a.addSeparator(),0<u.getIncomingEdges(c).length&&
-this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};t.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(u.model.getTerminal(a[c],!1));u.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getIncomingEdges(a);if(null!=a&&0<a.length&&
-(a=u.getOutgoingEdges(u.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(u.model.getTerminal(a[c],!1));u.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getIncomingEdges(a);null!=a&&0<a.length&&u.setSelectionCell(u.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=
-u.getSelectionCell(),b=[];u.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});u.setSelectionCells(b)}},null,null,"Alt+Shift+D");var v=u.removeCells;u.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var f=[],g=0;g<a.length;g++){var h=a[g];w.isEdge(h)&&c(h)&&(f.push(h),h=w.getTerminal(h,!1));b(h)?(u.traverse(h,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0}),h=u.getIncomingEdges(a[g]),
-a=a.concat(h)):f.push(a[g])}a=f;return v.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var x=u.duplicateCells;u.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),f=0;f<d.length;f++){var g=u.view.getState(d[f]);if(null!=g&&b(g.cell))for(var h=u.getIncomingEdges(g.cell),g=0;g<h.length;g++)mxUtils.remove(h[g],a)}this.model.beginUpdate();try{var k=x.call(this,a,c);if(k.length==
-a.length)for(f=0;f<a.length;f++)if(b(a[f])){var l=u.getIncomingEdges(k[f]),h=u.getIncomingEdges(a[f]);if(0==l.length&&0<h.length){var m=this.cloneCell(h[0]);this.addEdge(m,u.getDefaultParent(),this.model.getTerminal(h[0],!0),k[f])}}}finally{this.model.endUpdate()}return k};var E=u.moveCells;u.moveCells=function(a,c,d,f,g,h,k){var l=null;this.model.beginUpdate();try{var m=g,n=this.view.getState(g),p=null!=n?n.style:this.getCellStyle(g);if(null!=a&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=
-0;q<a.length;q++)if(b(a[q])||u.model.isEdge(a[q])&&null==u.model.getTerminal(a[q],!0)){g=u.model.getParent(a[q]);break}if(null!=m&&g!=m&&null!=this.view.getState(a[0])){var w=u.getIncomingEdges(a[0]);if(0<w.length){var t=u.view.getState(u.model.getTerminal(w[0],!0));if(null!=t){var v=u.view.getState(m);null!=v&&(c=(v.getCenterX()-t.getCenterX())/u.view.scale,d=(v.getCenterY()-t.getCenterY())/u.view.scale)}}}}l=E.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(m)&&
-0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],m,!0);else if(b(a[q])&&(w=u.getIncomingEdges(a[q]),0<w.length))if(!f)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(w[0],!0))&&this.model.setTerminal(w[0],m,!0);else if(0==u.getIncomingEdges(l[q]).length){n=m;if(null==n||n==u.model.getParent(a[q]))n=u.model.getTerminal(w[0],!0);f=this.cloneCell(w[0]);this.addEdge(f,u.getDefaultParent(),n,l[q])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var F=t.sidebar.dropAndConnect;
-t.sidebar.dropAndConnect=function(a,c,d,f){var g=u.model,h=null;g.beginUpdate();try{if(h=F.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(g.isEdge(h[k])&&null==g.getTerminal(h[k],!0)){g.setTerminal(h[k],a,!0);var l=u.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return h}}var z={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},A=
-t.onKeyDown;t.onKeyDown=function(a){try{if(u.isEnabled()&&!u.isEditing()&&b(u.getSelectionCell())&&1==u.getSelectionCount()){var c=null;0<u.getIncomingEdges(u.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?g(u.getSelectionCell()):l(u.getSelectionCell()):13==a.which&&(c=p(u.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&u.model.isEdge(c[0])?u.setSelectionCell(u.model.getTerminal(c[0],!1)):u.setSelectionCell(c[c.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(u.view.getState(u.getSelectionCell())),
-u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=z[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var G=u.connectVertex;u.connectVertex=function(a,c,d,f,h,k){var n=u.getIncomingEdges(a);return b(a)&&0<n.length?(d=m(a),f=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,h=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?l(a):f==h?g(a):p(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,d,f,h,k)};u.getSubtree=function(a){var c=[a];b(a)&&
-!d(a)&&u.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
+this.model.setCollapsed(d[k],a))}for(k=0;k<h.length;k++)this.model.setVisible(h[k],!a);d=f;d=c.apply(this,arguments)}finally{this.model.endUpdate()}return d};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=v.view.getState(a),v.view.getState(a),b="tree"==(null!=
+b?b.style:v.getCellStyle(a)).containerType);return b}function d(a){var b=!1;null!=a&&(a=w.getParent(a),b=v.view.getState(a),v.view.getState(a),b=null!=(null!=b?b.style:v.getCellStyle(a)).childLayout);return b}function m(a){a=v.view.getState(a);if(null!=a){var b=v.getIncomingEdges(a.cell);if(0<b.length&&(b=v.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
+a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function p(a,b){b=null!=b?b:!0;v.model.beginUpdate();try{var c=v.model.getParent(a),d=v.getIncomingEdges(a),f=v.cloneCells([d[0],a]);v.model.setTerminal(f[0],v.model.getTerminal(d[0],!0),!0);var g=m(a),h=c.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-
+10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;v.view.currentRoot!=c&&(f[1].geometry.x-=h.x,f[1].geometry.y-=h.y);var k=v.view.getState(a),l=v.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*l;var p=v.getOutgoingEdges(v.model.getTerminal(d[0],!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||
+g==mxConstants.DIRECTION_NORTH,w=h=d=0;w<p.length;w++){var t=v.model.getTerminal(p[w],!1);if(g==m(t)){var u=v.view.getState(t);t!=a&&null!=u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/l),h=10+Math.max(h,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/l))}}q?h=0:d=0;for(w=0;w<p.length;w++)if(t=v.model.getTerminal(p[w],!1),g==m(t)&&(u=v.view.getState(t),t!=a&&null!=
+u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY()))){var x=[];v.traverse(u.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});v.moveCells(x,(b?1:-1)*d,(b?1:-1)*h)}}}return v.addCells(f,c)}finally{v.model.endUpdate()}}function g(a){v.model.beginUpdate();try{var b=m(a),c=v.getIncomingEdges(a),d=v.cloneCells([c[0],a]);v.model.setTerminal(c[0],d[1],!1);v.model.setTerminal(d[0],d[1],!0);v.model.setTerminal(d[0],a,!1);var f=v.model.getParent(a),g=f.geometry,h=[];v.view.currentRoot!=
+f&&(d[1].geometry.x-=g.x,d[1].geometry.y-=g.y);v.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);v.moveCells(h,k,l);return v.addCells(d,f)}finally{v.model.endUpdate()}}function l(a){v.model.beginUpdate();try{var b=v.model.getParent(a),c=v.getIncomingEdges(a),d=v.cloneCells([c[0],
+a]);v.model.setTerminal(d[0],a,!0);var c=v.getOutgoingEdges(a),f=b.geometry,g=[];v.view.currentRoot==b&&(f=new mxRectangle);for(var h=0;h<c.length;h++){var k=v.model.getTerminal(c[h],!1);null!=k&&g.push(k)}var l=v.view.getBounds(g),n=m(a),p=v.view.translate,q=v.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
+null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-f.x+40):d[1].geometry.x+(a.geometry.width-f.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/q-p.y+-f.y+10);return v.addCells(d,b)}finally{v.model.endUpdate()}}function n(a,b,c){a=v.getOutgoingEdges(a);c=v.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var f=0;f<a.length;f++){var g=v.view.getState(v.model.getTerminal(a[f],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.actions.get("selectParent").funct():
+c==b?(d=v.getOutgoingEdges(a),null!=d&&0<d.length&&v.setSelectionCell(v.model.getTerminal(d[0],!1))):(c=v.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(v.model.getTerminal(c[0],!0),d,a),c=v.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&v.setSelectionCell(d[c].cell)))))}var t=this,v=t.editor.graph,w=v.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
+mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var y=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==v.getSelectionCount()){c=v.getSelectionCell();var f=v.getOutgoingEdges(c);a.addSeparator();null!=f&&0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(v.getSelectionCell())&&(a.addSeparator(),0<v.getIncomingEdges(c).length&&
+this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};t.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var a=v.getSelectionCell(),a=v.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(v.model.getTerminal(a[c],!1));v.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var a=v.getSelectionCell(),a=v.getIncomingEdges(a);if(null!=a&&0<a.length&&
+(a=v.getOutgoingEdges(v.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(v.model.getTerminal(a[c],!1));v.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var a=v.getSelectionCell(),a=v.getIncomingEdges(a);null!=a&&0<a.length&&v.setSelectionCell(v.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var a=
+v.getSelectionCell(),b=[];v.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});v.setSelectionCells(b)}},null,null,"Alt+Shift+D");var u=v.removeCells;v.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var f=[],g=0;g<a.length;g++){var h=a[g];w.isEdge(h)&&c(h)&&(f.push(h),h=w.getTerminal(h,!1));b(h)?(v.traverse(h,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0}),h=v.getIncomingEdges(a[g]),
+a=a.concat(h)):f.push(a[g])}a=f;return u.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var x=v.duplicateCells;v.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),f=0;f<d.length;f++){var g=v.view.getState(d[f]);if(null!=g&&b(g.cell))for(var h=v.getIncomingEdges(g.cell),g=0;g<h.length;g++)mxUtils.remove(h[g],a)}this.model.beginUpdate();try{var k=x.call(this,a,c);if(k.length==
+a.length)for(f=0;f<a.length;f++)if(b(a[f])){var l=v.getIncomingEdges(k[f]),h=v.getIncomingEdges(a[f]);if(0==l.length&&0<h.length){var m=this.cloneCell(h[0]);this.addEdge(m,v.getDefaultParent(),this.model.getTerminal(h[0],!0),k[f])}}}finally{this.model.endUpdate()}return k};var E=v.moveCells;v.moveCells=function(a,c,d,f,g,h,k){var l=null;this.model.beginUpdate();try{var m=g,n=this.view.getState(g),p=null!=n?n.style:this.getCellStyle(g);if(null!=a&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=
+0;q<a.length;q++)if(b(a[q])||v.model.isEdge(a[q])&&null==v.model.getTerminal(a[q],!0)){g=v.model.getParent(a[q]);break}if(null!=m&&g!=m&&null!=this.view.getState(a[0])){var w=v.getIncomingEdges(a[0]);if(0<w.length){var u=v.view.getState(v.model.getTerminal(w[0],!0));if(null!=u){var t=v.view.getState(m);null!=t&&(c=(t.getCenterX()-u.getCenterX())/v.view.scale,d=(t.getCenterY()-u.getCenterY())/v.view.scale)}}}}l=E.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(m)&&
+0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],m,!0);else if(b(a[q])&&(w=v.getIncomingEdges(a[q]),0<w.length))if(!f)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(w[0],!0))&&this.model.setTerminal(w[0],m,!0);else if(0==v.getIncomingEdges(l[q]).length){n=m;if(null==n||n==v.model.getParent(a[q]))n=v.model.getTerminal(w[0],!0);f=this.cloneCell(w[0]);this.addEdge(f,v.getDefaultParent(),n,l[q])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var F=t.sidebar.dropAndConnect;
+t.sidebar.dropAndConnect=function(a,c,d,f){var g=v.model,h=null;g.beginUpdate();try{if(h=F.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(g.isEdge(h[k])&&null==g.getTerminal(h[k],!0)){g.setTerminal(h[k],a,!0);var l=v.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return h}}var z={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},A=
+t.onKeyDown;t.onKeyDown=function(a){try{if(v.isEnabled()&&!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var c=null;0<v.getIncomingEdges(v.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?g(v.getSelectionCell()):l(v.getSelectionCell()):13==a.which&&(c=p(v.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&v.model.isEdge(c[0])?v.setSelectionCell(v.model.getTerminal(c[0],!1)):v.setSelectionCell(c[c.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(v.view.getState(v.getSelectionCell())),
+v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=z[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var G=v.connectVertex;v.connectVertex=function(a,c,d,f,h,k){var n=v.getIncomingEdges(a);return b(a)&&0<n.length?(d=m(a),f=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,h=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?l(a):f==h?g(a):p(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,d,f,h,k)};v.getSubtree=function(a){var c=[a];b(a)&&
+!d(a)&&v.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
"18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.destroy;
mxVertexHandler.prototype.destroy=function(a,b){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,
40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
f.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");h.geometry.relative=!0;h.edge=!0;b.insertEdge(h,!0);f.insertEdge(h,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");q.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);q.insertEdge(t,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");u.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);u.insertEdge(w,!1);a.insert(d);a.insert(h);a.insert(t);a.insert(w);a.insert(b);a.insert(c);a.insert(f);a.insert(q);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);q.insertEdge(t,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");v.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);v.insertEdge(w,!1);a.insert(d);a.insert(h);a.insert(t);a.insert(w);a.insert(b);a.insert(c);a.insert(f);a.insert(q);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
@@ -8915,7 +8945,7 @@ this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&
new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);b.insertTemplateEnabled&&!b.isOffline()&&b.menus.addMenuItems(a,
["insertTemplate"],c);a.addSeparator(c);b.menus.addSubmenu("insertLayout",a,c);b.menus.addSubmenu("insertAdvanced",a,c);a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",a,c)})));var h="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,c,d,f){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,f);b.showDialog(a.container,620,420,
!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<h.length;c++)"-"==h[c]?a.addSeparator(b):k(a,b,mxResources.get(h[c])+"...",h[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,
-["copyConnect","collapseExpand","-","pageScale"],c)})))};var u=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=h.menus.get(a),f=n.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),m);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",
+["copyConnect","collapseExpand","-","pageScale"],c)})))};var v=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=h.menus.get(a),f=n.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),m);f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",
mxResources.get(a));h.menus.menuCreated(d,f,"geMenuItem");null!=c?(f.style.backgroundImage="url("+c+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):b||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function c(a,b,c,d,f,g){var k=document.createElement("a");
k.className="geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";null!=h.statusContainer?l.insertBefore(k,h.statusContainer):l.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,a);mxEvent.addListener(k,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(k,"click",function(a){"disabled"!=k.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(k.style.marginRight="4px");null!=d&&k.setAttribute("title",d);null!=f&&(a=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled","disabled"),k.style.cursor="default")},f.addListener("stateChanged",a),a());return k}function d(a,b){var c=
@@ -8929,7 +8959,7 @@ d([c("",function(){k.popupMenuHandler.hideMenu();var a=k.view.scale,b=k.view.tra
640<=b?c("",f.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=b?c("",g.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}f=h.menus.get("language");null!=f&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=b?(null==M&&(g=n.addMenu("",f.funct),g.setAttribute("title",mxResources.get("language")),g.className="geToolbarButton",g.style.backgroundImage="url("+Editor.globeImage+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.position="absolute",g.style.height="24px",g.style.width="24px",g.style.zIndex="1",g.style.top="11px",g.style.right=
-"8px",g.style.cursor="pointer",l.appendChild(g),M=g),h.buttonContainer.style.paddingRight="34px"):(h.buttonContainer.style.paddingRight="4px",null!=M&&(M.parentNode.removeChild(M),M=null))}u.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);var h=this,k=h.editor.graph;h.toolbar=this.createToolbar(h.createDiv("geToolbar"));
+"8px",g.style.cursor="pointer",l.appendChild(g),M=g),h.buttonContainer.style.paddingRight="34px"):(h.buttonContainer.style.paddingRight="4px",null!=M&&(M.parentNode.removeChild(M),M=null))}v.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);var h=this,k=h.editor.graph;h.toolbar=this.createToolbar(h.createDiv("geToolbar"));
h.defaultLibraryName=mxResources.get("untitledLibrary");var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var m=null,n=new Menubar(h,l);h.statusContainer=h.createStatusContainer();h.statusContainer.style.position="relative";h.statusContainer.style.maxWidth="";h.statusContainer.style.marginTop="7px";h.statusContainer.style.marginLeft=
"6px";h.statusContainer.style.color="gray";h.statusContainer.style.cursor="default";h.editor.addListener("statusChanged",mxUtils.bind(this,function(){h.setStatusText(h.editor.getStatus())}));var p=h.descriptorChanged;h.descriptorChanged=function(){p.apply(this,arguments);var a=h.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);l.setAttribute("title",a.getTitle()+(null!=b?" ("+b+
")":""))}else l.removeAttribute("title")};h.setStatusText(h.editor.getStatus());l.appendChild(h.statusContainer);h.buttonContainer=document.createElement("div");h.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";l.appendChild(h.buttonContainer);h.menubarContainer=h.buttonContainer;h.tabContainer=document.createElement("div");h.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";
@@ -8937,13 +8967,13 @@ var g=h.diagramContainer.parentNode,q=document.createElement("div");q.style.cssT
D.style.backgroundRepeat="no-repeat";D.style.backgroundColor="#ffffff";D.style.paddingRight="10px";D.style.display="block";D.style.position="absolute";D.style.textDecoration="none";D.style.textDecoration="none";D.style.right="0px";D.style.bottom="0px";D.style.overflow="hidden";D.style.visibility="hidden";D.style.textAlign="center";D.style.color="#000";D.style.fontSize="12px";D.style.color="#707070";D.style.width="59px";D.style.borderTop="1px solid lightgray";D.style.borderLeft="1px solid lightgray";
D.style.height=parseInt(h.tabContainer.style.height)-1+"px";D.style.lineHeight=parseInt(h.tabContainer.style.height)+1+"px";q.appendChild(D);t=mxUtils.bind(this,function(){D.innerHTML=Math.round(100*h.editor.graph.view.scale)+"%"});h.editor.graph.view.addListener(mxEvent.EVENT_SCALE,t);h.editor.addListener("resetGraphView",t);h.editor.addListener("pageSelected",t);var I=h.setGraphEnabled;h.setGraphEnabled=function(){I.apply(this,arguments);null!=this.tabContainer&&(D.style.visibility=this.tabContainer.style.visibility,
this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}q.appendChild(h.tabContainer);q.appendChild(l);q.appendChild(h.diagramContainer);g.appendChild(q);h.updateTabContainer();var M=null;f();mxEvent.addListener(window,"resize",function(){f();null!=h.sidebarWindow&&h.sidebarWindow.window.fit();null!=h.formatWindow&&h.formatWindow.window.fit();null!=h.actions.outlineWindow&&h.actions.outlineWindow.window.fit();null!=h.actions.layersWindow&&h.actions.layersWindow.window.fit();
-null!=h.menus.tagsWindow&&h.menus.tagsWindow.window.fit();null!=h.menus.findWindow&&h.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,h,k){var d=c.y,f=c.x,g=!1,l=!1;if(null!=this.states&&null!=b&&null!=c){var n=this,q=new mxCellState,t=this.graph.getView().scale,u=Math.max(2,this.getGuideTolerance()/2);q.x=b.x+f;q.y=b.y+d;q.width=b.width;q.height=b.height;for(var w=[],y=[],v=0;v<this.states.length;v++){var x=this.states[v];x instanceof mxCellState&&(k||!this.graph.isCellSelected(x.cell))&&((q.x>=x.x&&q.x<=x.x+x.width||x.x>=q.x&&x.x<=q.x+q.width)&&(q.y>
-x.y+x.height+4||q.y+q.height+4<x.y)?w.push(x):(q.y>=x.y&&q.y<=x.y+x.height||x.y>=q.y&&x.y<=q.y+q.height)&&(q.x>x.x+x.width+4||q.x+q.width+4<x.x)&&y.push(x))}var E=0,F=0,z=x=0,A=0,G=0,B=0,H=0,J=5*t;if(1<w.length){w.push(q);w.sort(function(a,b){return a.y-b.y});var C=!1,v=q==w[0],t=q==w[w.length-1];if(!v&&!t)for(v=1;v<w.length-1;v++)if(q==w[v]){t=w[v-1];v=w[v+1];x=F=z=(v.y-t.y-t.height-q.height)/2;break}for(v=0;v<w.length-1;v++){var t=w[v],D=w[v+1],I=q==t||q==D,D=D.y-t.y-t.height,C=C|q==t;if(0==F&&
-0==E)F=D,E=1;else if(Math.abs(F-D)<=(I||1==v&&C?u:0))E+=1;else if(1<E&&C){w=w.slice(0,v+1);break}else if(3<=w.length-v&&!C)E=0,x=F=0!=z?z:0,w.splice(0,0==v?1:v),v=-1;else break;0!=x||I||(F=x=D)}3==w.length&&w[1]==q&&(x=0)}if(1<y.length){y.push(q);y.sort(function(a,b){return a.x-b.x});C=!1;v=q==y[0];t=q==y[y.length-1];if(!v&&!t)for(v=1;v<y.length-1;v++)if(q==y[v]){t=y[v-1];v=y[v+1];B=G=H=(v.x-t.x-t.width-q.width)/2;break}for(v=0;v<y.length-1;v++){t=y[v];D=y[v+1];I=q==t||q==D;D=D.x-t.x-t.width;C|=q==
-t;if(0==G&&0==A)G=D,A=1;else if(Math.abs(G-D)<=(I||1==v&&C?u:0))A+=1;else if(1<A&&C){y=y.slice(0,v+1);break}else if(3<=y.length-v&&!C)A=0,B=G=0!=H?H:0,y.splice(0,0==v?1:v),v=-1;else break;0!=B||I||(G=B=D)}3==y.length&&y[1]==q&&(B=0)}u=function(a,b,c,d){var f=[],g;d?(d=J,g=0):(d=0,g=J);f.push(new mxPoint(a.x-d,a.y-g));f.push(new mxPoint(a.x+d,a.y+g));f.push(a);f.push(b);f.push(new mxPoint(b.x-d,b.y-g));f.push(new mxPoint(b.x+d,b.y+g));if(null!=c)return c.points=f,c;a=new mxPolyline(f,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(n.graph.getView().getOverlayPane());return a};G=function(a,b){if(a&&null!=n.guidesArrHor)for(var c=0;c<n.guidesArrHor.length;c++)n.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=n.guidesArrVer)for(c=0;c<n.guidesArrVer.length;c++)n.guidesArrVer[c].node.style.visibility="hidden"};if(1<A&&A==y.length-1){A=[];H=n.guidesArrHor;g=[];f=0;v=y[0]==q?1:0;C=y[v].y+y[v].height;if(0<B)for(v=0;v<y.length-1;v++)t=
-y[v],D=y[v+1],q==t?(f=D.x-t.width-B,g.push(new mxPoint(f+t.width+J,C)),g.push(new mxPoint(D.x-J,C))):q==D?(g.push(new mxPoint(t.x+t.width+J,C)),f=t.x+t.width+B,g.push(new mxPoint(f-J,C))):(g.push(new mxPoint(t.x+t.width+J,C)),g.push(new mxPoint(D.x-J,C)));else t=y[0],v=y[2],f=t.x+t.width+(v.x-t.x-t.width-q.width)/2,g.push(new mxPoint(t.x+t.width+J,C)),g.push(new mxPoint(f-J,C)),g.push(new mxPoint(f+q.width+J,C)),g.push(new mxPoint(v.x-J,C));for(v=0;v<g.length;v+=2)y=g[v],B=g[v+1],y=u(y,B,null!=H?
-H[v/2]:null),y.node.style.visibility="visible",y.redraw(),A.push(y);for(v=g.length/2;null!=H&&v<H.length;v++)H[v].destroy();n.guidesArrHor=A;f-=b.x;g=!0}else G(!0);if(1<E&&E==w.length-1){A=[];H=n.guidesArrVer;l=[];d=0;v=w[0]==q?1:0;E=w[v].x+w[v].width;if(0<x)for(v=0;v<w.length-1;v++)t=w[v],D=w[v+1],q==t?(d=D.y-t.height-x,l.push(new mxPoint(E,d+t.height+J)),l.push(new mxPoint(E,D.y-J))):q==D?(l.push(new mxPoint(E,t.y+t.height+J)),d=t.y+t.height+x,l.push(new mxPoint(E,d-J))):(l.push(new mxPoint(E,t.y+
-t.height+J)),l.push(new mxPoint(E,D.y-J)));else t=w[0],v=w[2],d=t.y+t.height+(v.y-t.y-t.height-q.height)/2,l.push(new mxPoint(E,t.y+t.height+J)),l.push(new mxPoint(E,d-J)),l.push(new mxPoint(E,d+q.height+J)),l.push(new mxPoint(E,v.y-J));for(v=0;v<l.length;v+=2)y=l[v],B=l[v+1],y=u(y,B,null!=H?H[v/2]:null,!0),y.node.style.visibility="visible",y.redraw(),A.push(y);for(v=l.length/2;null!=H&&v<H.length;v++)H[v].destroy();n.guidesArrVer=A;d-=b.y;l=!0}else G(!1,!0)}if(g||l)return q=new mxPoint(f,d),w=a.call(this,
+null!=h.menus.tagsWindow&&h.menus.tagsWindow.window.fit();null!=h.menus.findWindow&&h.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,h,k){var d=c.y,f=c.x,g=!1,l=!1;if(null!=this.states&&null!=b&&null!=c){var n=this,q=new mxCellState,t=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);q.x=b.x+f;q.y=b.y+d;q.width=b.width;q.height=b.height;for(var w=[],y=[],u=0;u<this.states.length;u++){var x=this.states[u];x instanceof mxCellState&&(k||!this.graph.isCellSelected(x.cell))&&((q.x>=x.x&&q.x<=x.x+x.width||x.x>=q.x&&x.x<=q.x+q.width)&&(q.y>
+x.y+x.height+4||q.y+q.height+4<x.y)?w.push(x):(q.y>=x.y&&q.y<=x.y+x.height||x.y>=q.y&&x.y<=q.y+q.height)&&(q.x>x.x+x.width+4||q.x+q.width+4<x.x)&&y.push(x))}var E=0,F=0,z=x=0,A=0,G=0,B=0,H=0,J=5*t;if(1<w.length){w.push(q);w.sort(function(a,b){return a.y-b.y});var C=!1,u=q==w[0],t=q==w[w.length-1];if(!u&&!t)for(u=1;u<w.length-1;u++)if(q==w[u]){t=w[u-1];u=w[u+1];x=F=z=(u.y-t.y-t.height-q.height)/2;break}for(u=0;u<w.length-1;u++){var t=w[u],D=w[u+1],I=q==t||q==D,D=D.y-t.y-t.height,C=C|q==t;if(0==F&&
+0==E)F=D,E=1;else if(Math.abs(F-D)<=(I||1==u&&C?v:0))E+=1;else if(1<E&&C){w=w.slice(0,u+1);break}else if(3<=w.length-u&&!C)E=0,x=F=0!=z?z:0,w.splice(0,0==u?1:u),u=-1;else break;0!=x||I||(F=x=D)}3==w.length&&w[1]==q&&(x=0)}if(1<y.length){y.push(q);y.sort(function(a,b){return a.x-b.x});C=!1;u=q==y[0];t=q==y[y.length-1];if(!u&&!t)for(u=1;u<y.length-1;u++)if(q==y[u]){t=y[u-1];u=y[u+1];B=G=H=(u.x-t.x-t.width-q.width)/2;break}for(u=0;u<y.length-1;u++){t=y[u];D=y[u+1];I=q==t||q==D;D=D.x-t.x-t.width;C|=q==
+t;if(0==G&&0==A)G=D,A=1;else if(Math.abs(G-D)<=(I||1==u&&C?v:0))A+=1;else if(1<A&&C){y=y.slice(0,u+1);break}else if(3<=y.length-u&&!C)A=0,B=G=0!=H?H:0,y.splice(0,0==u?1:u),u=-1;else break;0!=B||I||(G=B=D)}3==y.length&&y[1]==q&&(B=0)}v=function(a,b,c,d){var f=[],g;d?(d=J,g=0):(d=0,g=J);f.push(new mxPoint(a.x-d,a.y-g));f.push(new mxPoint(a.x+d,a.y+g));f.push(a);f.push(b);f.push(new mxPoint(b.x-d,b.y-g));f.push(new mxPoint(b.x+d,b.y+g));if(null!=c)return c.points=f,c;a=new mxPolyline(f,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(n.graph.getView().getOverlayPane());return a};G=function(a,b){if(a&&null!=n.guidesArrHor)for(var c=0;c<n.guidesArrHor.length;c++)n.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=n.guidesArrVer)for(c=0;c<n.guidesArrVer.length;c++)n.guidesArrVer[c].node.style.visibility="hidden"};if(1<A&&A==y.length-1){A=[];H=n.guidesArrHor;g=[];f=0;u=y[0]==q?1:0;C=y[u].y+y[u].height;if(0<B)for(u=0;u<y.length-1;u++)t=
+y[u],D=y[u+1],q==t?(f=D.x-t.width-B,g.push(new mxPoint(f+t.width+J,C)),g.push(new mxPoint(D.x-J,C))):q==D?(g.push(new mxPoint(t.x+t.width+J,C)),f=t.x+t.width+B,g.push(new mxPoint(f-J,C))):(g.push(new mxPoint(t.x+t.width+J,C)),g.push(new mxPoint(D.x-J,C)));else t=y[0],u=y[2],f=t.x+t.width+(u.x-t.x-t.width-q.width)/2,g.push(new mxPoint(t.x+t.width+J,C)),g.push(new mxPoint(f-J,C)),g.push(new mxPoint(f+q.width+J,C)),g.push(new mxPoint(u.x-J,C));for(u=0;u<g.length;u+=2)y=g[u],B=g[u+1],y=v(y,B,null!=H?
+H[u/2]:null),y.node.style.visibility="visible",y.redraw(),A.push(y);for(u=g.length/2;null!=H&&u<H.length;u++)H[u].destroy();n.guidesArrHor=A;f-=b.x;g=!0}else G(!0);if(1<E&&E==w.length-1){A=[];H=n.guidesArrVer;l=[];d=0;u=w[0]==q?1:0;E=w[u].x+w[u].width;if(0<x)for(u=0;u<w.length-1;u++)t=w[u],D=w[u+1],q==t?(d=D.y-t.height-x,l.push(new mxPoint(E,d+t.height+J)),l.push(new mxPoint(E,D.y-J))):q==D?(l.push(new mxPoint(E,t.y+t.height+J)),d=t.y+t.height+x,l.push(new mxPoint(E,d-J))):(l.push(new mxPoint(E,t.y+
+t.height+J)),l.push(new mxPoint(E,D.y-J)));else t=w[0],u=w[2],d=t.y+t.height+(u.y-t.y-t.height-q.height)/2,l.push(new mxPoint(E,t.y+t.height+J)),l.push(new mxPoint(E,d-J)),l.push(new mxPoint(E,d+q.height+J)),l.push(new mxPoint(E,u.y-J));for(u=0;u<l.length;u+=2)y=l[u],B=l[u+1],y=v(y,B,null!=H?H[u/2]:null,!0),y.node.style.visibility="visible",y.redraw(),A.push(y);for(u=l.length/2;null!=H&&u<H.length;u++)H[u].destroy();n.guidesArrVer=A;d-=b.y;l=!0}else G(!1,!0)}if(g||l)return q=new mxPoint(f,d),w=a.call(this,
b,q,h,k),g&&!l?q.y=w.y:l&&!g&&(q.x=w.x),w.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),w.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;G(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,d=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
d)for(k=0;k<d.length;k++)d[k].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var h=0;h<a.length;h++)a[h].destroy();this.guidesArrVer=null}if(null!=c){for(h=0;h<c.length;h++)c[h].destroy();this.guidesArrHor=null}}})();
diff --git a/src/main/webapp/js/atlas-viewer.min.js b/src/main/webapp/js/atlas-viewer.min.js
index cd5f5729..11585e33 100644
--- a/src/main/webapp/js/atlas-viewer.min.js
+++ b/src/main/webapp/js/atlas-viewer.min.js
@@ -1997,12 +1997,12 @@ a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.backg
Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,f){b.undoableEditHappened(f.getProperty("edit"))};var f=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(b,f){var d=a.getSelectionCellsForChanges(f.getProperty("edit").changes);a.getModel();for(var k=[],r=0;r<d.length;r++)null!=a.view.getState(d[r])&&k.push(d[r]);a.setSelectionCells(k)};
b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};
OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,f,d,k,n,q,r,u,c){var g=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(g=80);f+=g;d+=g;var h=f,l=d,p=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),m=Math.max(1,Math.round((document.body.clientWidth-f-64)/2)),t=Math.max(1,Math.round((p-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-
-64);d=Math.min(d,p-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=p+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var x=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=x.x+"px";this.bg.style.top=x.y+"px";m+=x.x;t+=x.y;
-k&&document.body.appendChild(this.bg);var w=a.createDiv(u?"geTransDialog":"geDialog");k=this.getPosition(m,t,f,d);m=k.x;t=k.y;w.style.width=f+"px";w.style.height=d+"px";w.style.left=m+"px";w.style.top=t+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!r&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",
-n.style.top=t+14+"px",n.style.left=m+f+38-g+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=n,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=c){var x=c();null!=x&&(h=f=x.w,l=d=x.h)}p=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=p+"px";
-m=Math.max(1,Math.round((document.body.clientWidth-f-64)/2));t=Math.max(1,Math.round((p-d-a.footerHeight)/3));f=Math.min(h,document.body.scrollWidth-64);d=Math.min(l,p-64);x=this.getPosition(m,t,f,d);m=x.x;t=x.y;w.style.left=m+"px";w.style.top=t+"px";w.style.width=f+"px";w.style.height=d+"px";!r&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=t+14+"px",this.dialogImg.style.left=m+f+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);
-this.onDialogClose=q;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,b,f,d,k,n,p,r,u,c){var g=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(g=80);f+=g;d+=g;var h=f,l=d,t=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),m=Math.max(1,Math.round((document.body.clientWidth-f-64)/2)),q=Math.max(1,Math.round((t-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-
+64);d=Math.min(d,t-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=t+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var x=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=x.x+"px";this.bg.style.top=x.y+"px";m+=x.x;q+=x.y;
+k&&document.body.appendChild(this.bg);var w=a.createDiv(u?"geTransDialog":"geDialog");k=this.getPosition(m,q,f,d);m=k.x;q=k.y;w.style.width=f+"px";w.style.height=d+"px";w.style.left=m+"px";w.style.top=q+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!r&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",
+n.style.top=q+14+"px",n.style.left=m+f+38-g+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=n,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=c){var x=c();null!=x&&(h=f=x.w,l=d=x.h)}t=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=t+"px";
+m=Math.max(1,Math.round((document.body.clientWidth-f-64)/2));q=Math.max(1,Math.round((t-d-a.footerHeight)/3));f=Math.min(h,document.body.scrollWidth-64);d=Math.min(l,t-64);x=this.getPosition(m,q,f,d);m=x.x;q=x.y;w.style.left=m+"px";w.style.top=q+"px";w.style.width=f+"px";w.style.height=d+"px";!r&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=q+14+"px",this.dialogImg.style.left=m+f+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);
+this.onDialogClose=p;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -2012,29 +2012,29 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var b=r.checked||c.checked,d=parseInt(h.value)/100;isNaN(d)&&(d=1,h.value="100%");var d=.75*d,l=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,p=1/f.pageScale;if(b){var k=r.checked?1:parseInt(g.value);isNaN(k)||(p=mxUtils.getScaleForPageCount(k,f,l))}f.getGraphBounds();var y=k=0,l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*d);l.height=Math.ceil(l.height*d);p*=d;!b&&f.pageVisible?(d=f.getPageLayout(),k-=d.x*l.width,y-=d.y*l.height):
-b=!0;b=PrintDialog.createPrintPreview(f,p,l,0,k,y,b);b.open();a&&PrintDialog.printPreview(b)}var f=a.editor.graph,d,k,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var r=document.createElement("input");r.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(r);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
-k.appendChild(u);mxEvent.addListener(u,"click",function(a){r.checked=!r.checked;c.checked=!r.checked;mxEvent.consume(a)});mxEvent.addListener(r,"change",function(){c.checked=!r.checked});d.appendChild(k);q.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");k.appendChild(u);mxEvent.addListener(u,
-"click",function(a){c.checked=!c.checked;r.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);q.appendChild(d);mxEvent.addListener(c,"change",
-function(){c.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");r.checked=!c.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var h=document.createElement("input");h.setAttribute("value","100 %");h.setAttribute("size","5");h.style.width="50px";k.appendChild(h);d.appendChild(k);q.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
+PrintDialog.prototype.create=function(a){function b(a){var b=r.checked||c.checked,d=parseInt(h.value)/100;isNaN(d)&&(d=1,h.value="100%");var d=.75*d,l=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,t=1/f.pageScale;if(b){var k=r.checked?1:parseInt(g.value);isNaN(k)||(t=mxUtils.getScaleForPageCount(k,f,l))}f.getGraphBounds();var y=k=0,l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*d);l.height=Math.ceil(l.height*d);t*=d;!b&&f.pageVisible?(d=f.getPageLayout(),k-=d.x*l.width,y-=d.y*l.height):
+b=!0;b=PrintDialog.createPrintPreview(f,t,l,0,k,y,b);b.open();a&&PrintDialog.printPreview(b)}var f=a.editor.graph,d,k,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var r=document.createElement("input");r.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(r);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+k.appendChild(u);mxEvent.addListener(u,"click",function(a){r.checked=!r.checked;c.checked=!r.checked;mxEvent.consume(a)});mxEvent.addListener(r,"change",function(){c.checked=!r.checked});d.appendChild(k);p.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");k.appendChild(u);mxEvent.addListener(u,
+"click",function(a){c.checked=!c.checked;r.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);p.appendChild(d);mxEvent.addListener(c,"change",
+function(){c.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");r.checked=!c.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var h=document.createElement("input");h.setAttribute("value","100 %");h.setAttribute("size","5");h.style.width="50px";k.appendChild(h);d.appendChild(k);p.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
k.style.paddingTop="20px";k.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&k.appendChild(u);if(PrintDialog.previewEnabled){var l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});l.className="geBtn";k.appendChild(l)}l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});l.className="geBtn gePrimaryBtn";k.appendChild(l);a.editor.cancelFirst||
-k.appendChild(u);d.appendChild(k);q.appendChild(d);n.appendChild(q);this.container=n};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
-PrintDialog.createPrintPreview=function(a,b,f,d,k,n,q){b=new mxPrintPreview(a,b,f,d,k,n);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var r=b.writeHead;b.writeHead=function(a){r.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+k.appendChild(u);d.appendChild(k);p.appendChild(d);n.appendChild(p);this.container=n};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
+PrintDialog.createPrintPreview=function(a,b,f,d,k,n,p){b=new mxPrintPreview(a,b,f,d,k,n);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var r=b.writeHead;b.writeHead=function(a){r.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=g,c.style.backgroundImage="")}function f(){null==p?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxResources.get("change")+"..."):(l.setAttribute("title",p.src),l.style.fontSize="11px",l.innerHTML=p.src.substring(0,42)+"...")}var d=a.editor.graph,k,n,q=document.createElement("table");q.style.width=
-"100%";q.style.height="100%";var r=document.createElement("tbody");k=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);r.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
+var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=g,c.style.backgroundImage="")}function f(){null==t?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxResources.get("change")+"..."):(l.setAttribute("title",t.src),l.style.fontSize="11px",l.innerHTML=t.src.substring(0,42)+"...")}var d=a.editor.graph,k,n,p=document.createElement("table");p.style.width=
+"100%";p.style.height="100%";var r=document.createElement("tbody");k=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);r.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var c=document.createElement("button");c.style.width="18px";c.style.height="18px";c.style.marginRight="20px";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";var g=d.background;b();mxEvent.addListener(c,"click",function(c){a.pickColor(g||"none",function(a){g=a;b()});mxEvent.consume(c)});
n.appendChild(c);mxUtils.write(n,mxResources.get("gridSize")+":");var h=document.createElement("input");h.setAttribute("type","number");h.setAttribute("min","0");h.style.width="40px";h.style.marginLeft="6px";h.value=d.getGridSize();n.appendChild(h);mxEvent.addListener(h,"change",function(){var a=parseInt(h.value);h.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(n);r.appendChild(k);k=document.createElement("tr");n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+
-":");k.appendChild(n);n=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var p=d.backgroundImage;mxEvent.addListener(l,"click",function(c){a.showBackgroundImageDialog(function(a){p=a;f()});mxEvent.consume(c)});f();n.appendChild(l);k.appendChild(n);r.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");var m=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&n.appendChild(m);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==h.value&&d.setGridSize(parseInt(h.value));var c=new ChangePageSetup(a,g,p,u.get());c.ignoreColor=d.background==g;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=p?p.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
-c.ignoreColor&&c.ignoreImage||d.model.execute(c)});t.className="geBtn gePrimaryBtn";n.appendChild(t);a.editor.cancelFirst||n.appendChild(m);k.appendChild(n);r.appendChild(k);q.appendChild(r);this.container=q};
-PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function k(a,c,b){if(b||h!=document.activeElement&&l!=document.activeElement){a=!1;for(c=0;c<m.length;c++)b=m[c],D?"custom"==b.key&&(r.value=b.key,D=!1):null!=b.format&&("a4"==b.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==b.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==b.format.width&&
-f.height==b.format.height?(r.value=b.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):f.width==b.format.height&&f.height==b.format.width&&(r.value=b.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(u.style.display="",g.style.display="none"):(h.value=f.width/100,l.value=f.height/100,n.setAttribute("checked","checked"),
-r.value="custom",u.style.display="none",g.style.display="")}}b="format-"+b;var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var r=document.createElement("select");r.style.marginBottom="8px";r.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
-u.style.height="24px";n.style.marginRight="6px";u.appendChild(n);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";u.appendChild(q);var c=document.createElement("span");c.style.width="100px";mxUtils.write(c,mxResources.get("landscape"));u.appendChild(c);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";var h=document.createElement("input");
-h.setAttribute("size","7");h.style.textAlign="right";g.appendChild(h);mxUtils.write(g," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";g.appendChild(l);mxUtils.write(g," in");u.style.display="none";g.style.display="none";for(var p={},m=PageSetupDialog.getFormats(),t=0;t<m.length;t++){var x=m[t];p[x.key]=x;var w=document.createElement("option");w.setAttribute("value",x.key);mxUtils.write(w,x.title);r.appendChild(w)}var D=!1;k();a.appendChild(r);mxUtils.br(a);
-a.appendChild(u);a.appendChild(g);var y=f,v=function(a,c){var b=p[r.value];null!=b.format?(h.value=b.format.width/100,l.value=b.format.height/100,g.style.display="none",u.style.display=""):(u.style.display="none",g.style.display="");b=parseFloat(h.value);if(isNaN(b)||0>=b)h.value=f.width/100;b=parseFloat(l.value);if(isNaN(b)||0>=b)l.value=f.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(h.value)),Math.floor(100*parseFloat(l.value)));"custom"!=r.value&&q.checked&&(b=new mxRectangle(0,0,
-b.height,b.width));c&&D||b.width==y.width&&b.height==y.height||(y=b,null!=d&&d(y))};mxEvent.addListener(b,"click",function(a){n.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){q.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(h,"blur",v);mxEvent.addListener(h,"click",v);mxEvent.addListener(l,"blur",v);mxEvent.addListener(l,"click",v);mxEvent.addListener(q,"change",v);mxEvent.addListener(n,"change",v);mxEvent.addListener(r,"change",function(a){D="custom"==r.value;
+":");k.appendChild(n);n=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var t=d.backgroundImage;mxEvent.addListener(l,"click",function(c){a.showBackgroundImageDialog(function(a){t=a;f()});mxEvent.consume(c)});f();n.appendChild(l);k.appendChild(n);r.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");var m=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&n.appendChild(m);var q=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==h.value&&d.setGridSize(parseInt(h.value));var c=new ChangePageSetup(a,g,t,u.get());c.ignoreColor=d.background==g;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=t?t.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
+c.ignoreColor&&c.ignoreImage||d.model.execute(c)});q.className="geBtn gePrimaryBtn";n.appendChild(q);a.editor.cancelFirst||n.appendChild(m);k.appendChild(n);r.appendChild(k);p.appendChild(r);this.container=p};
+PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function k(a,c,b){if(b||h!=document.activeElement&&l!=document.activeElement){a=!1;for(c=0;c<m.length;c++)b=m[c],E?"custom"==b.key&&(r.value=b.key,E=!1):null!=b.format&&("a4"==b.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==b.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==b.format.width&&
+f.height==b.format.height?(r.value=b.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):f.width==b.format.height&&f.height==b.format.width&&(r.value=b.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(u.style.display="",g.style.display="none"):(h.value=f.width/100,l.value=f.height/100,n.setAttribute("checked","checked"),
+r.value="custom",u.style.display="none",g.style.display="")}}b="format-"+b;var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var r=document.createElement("select");r.style.marginBottom="8px";r.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
+u.style.height="24px";n.style.marginRight="6px";u.appendChild(n);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";u.appendChild(p);var c=document.createElement("span");c.style.width="100px";mxUtils.write(c,mxResources.get("landscape"));u.appendChild(c);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";var h=document.createElement("input");
+h.setAttribute("size","7");h.style.textAlign="right";g.appendChild(h);mxUtils.write(g," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";g.appendChild(l);mxUtils.write(g," in");u.style.display="none";g.style.display="none";for(var t={},m=PageSetupDialog.getFormats(),q=0;q<m.length;q++){var x=m[q];t[x.key]=x;var w=document.createElement("option");w.setAttribute("value",x.key);mxUtils.write(w,x.title);r.appendChild(w)}var E=!1;k();a.appendChild(r);mxUtils.br(a);
+a.appendChild(u);a.appendChild(g);var y=f,v=function(a,c){var b=t[r.value];null!=b.format?(h.value=b.format.width/100,l.value=b.format.height/100,g.style.display="none",u.style.display=""):(u.style.display="none",g.style.display="");b=parseFloat(h.value);if(isNaN(b)||0>=b)h.value=f.width/100;b=parseFloat(l.value);if(isNaN(b)||0>=b)l.value=f.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(h.value)),Math.floor(100*parseFloat(l.value)));"custom"!=r.value&&p.checked&&(b=new mxRectangle(0,0,
+b.height,b.width));c&&E||b.width==y.width&&b.height==y.height||(y=b,null!=d&&d(y))};mxEvent.addListener(b,"click",function(a){n.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(h,"blur",v);mxEvent.addListener(h,"click",v);mxEvent.addListener(l,"blur",v);mxEvent.addListener(l,"click",v);mxEvent.addListener(p,"change",v);mxEvent.addListener(n,"change",v);mxEvent.addListener(r,"change",function(a){E="custom"==r.value;
v(a,!0)});v();return{set:function(a){f=a;k(null,null,!0)},get:function(){return y},widthInput:h,heightInput:l}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]};
@@ -2045,38 +2045,38 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),c=1+f.x,f=1+f.y);h=-Math.round(h-mxUtils.mod(this.translate.x*this.scale-c,h))+"px "+-Math.round(h-mxUtils.mod(this.translate.y*this.scale-f,h))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=h,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=h,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],h=1;h<this.gridSteps;h++){var f=h*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+c)}return'<svg width="'+
c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=
-this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+b,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";c.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,h=this.view.translate,f=this.pageFormat,p=d*this.pageScale,m=this.view.getBackgroundPageBounds();b=m.width;c=m.height;var t=
-new mxRectangle(d*h.x,d*h.y,f.width*p,f.height*p),k=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(c/t.height)-1:0,w=a?Math.ceil(b/t.width)-1:0,r=m.x+b,y=m.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?k:w,b=0;b<=c;b++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(b+1)*t.height)),
-new mxPoint(Math.round(r),Math.round(m.y+(b+1)*t.height))]:[new mxPoint(Math.round(m.x+(b+1)*t.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(b+1)*t.width),Math.round(y))];null!=a[b]?(a[b].points=d,a[b].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[b]=d)}for(b=c;b<a.length;b++)a[b].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+b,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";c.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,h=this.view.translate,f=this.pageFormat,t=d*this.pageScale,m=this.view.getBackgroundPageBounds();b=m.width;c=m.height;var q=
+new mxRectangle(d*h.x,d*h.y,f.width*t,f.height*t),k=(a=a&&Math.min(q.width,q.height)>this.minPageBreakDist)?Math.ceil(c/q.height)-1:0,w=a?Math.ceil(b/q.width)-1:0,r=m.x+b,y=m.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?k:w,b=0;b<=c;b++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(b+1)*q.height)),
+new mxPoint(Math.round(r),Math.round(m.y+(b+1)*q.height))]:[new mxPoint(Math.round(m.x+(b+1)*q.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(b+1)*q.width),Math.round(y))];null!=a[b]?(a[b].points=d,a[b].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[b]=d)}for(b=c;b<a.length;b++)a[b].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,c){for(var g=0;g<d.length;g++)if(this.graph.getModel().isVertex(d[g])){var h=this.graph.getCellGeometry(d[g]);if(null!=h&&h.relative)return!1}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=f.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?
-!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,h=this.graph.pageScale,f=d.width*h,d=d.height*h,h=Math.floor(Math.min(0,b)/f),p=Math.floor(Math.min(0,
-c)/d);return new mxRectangle(this.scale*(this.translate.x+h*f),this.scale*(this.translate.y+p*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-h)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-p)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
+!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,h=this.graph.pageScale,f=d.width*h,d=d.height*h,h=Math.floor(Math.min(0,b)/f),t=Math.floor(Math.min(0,
+c)/d);return new mxRectangle(this.scale*(this.translate.x+h*f),this.scale*(this.translate.y+t*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-h)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-t)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,h,f){var g=k.apply(this,arguments);null==f||f||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var n=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=n.apply(this,arguments),h=b.getParent(d);
-if(null==c||c!=d&&c!=h)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(h)&&b.isVertex(h)&&!this.graph.isContainer(h);)d=h,h=this.graph.getModel().getParent(d);return d};var q=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=q.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),h=d.getParent(a);null!=h;){if(this.graph.isCellSelected(h)&&d.isVertex(h)){c=!0;break}h=d.getParent(h)}return c};mxGraphHandler.prototype.selectDelayed=
+if(null==c||c!=d&&c!=h)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(h)&&b.isVertex(h)&&!this.graph.isContainer(h);)d=h,h=this.graph.getModel().getParent(d);return d};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=p.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),h=d.getParent(a);null!=h;){if(this.graph.isCellSelected(h)&&d.isVertex(h)){c=!0;break}h=d.getParent(h)}return c};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=f;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||d.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=
k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var c=mxEvent.getSource(a);
if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();
-mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var n=!1,q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return n||q.apply(this,arguments)};this.keydownHandler=
+mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var n=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return n||p.apply(this,arguments)};this.keydownHandler=
mxUtils.bind(this,function(a){32==a.which?(n=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0)});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";n=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var r=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=
function(a){return r.apply(this,arguments)||n||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var u=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return u.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};
-var c=!1,g=null,h=null,l=null,p=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=f}a=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==l)this.toolbar.createTextToolbar();else{for(var m=0;m<l.length;m++)this.toolbar.container.appendChild(l[m]);this.toolbar.fontMenu=g;this.toolbar.sizeMenu=
-h}c=d.cellEditor.isContentEditing();g=a;h=f;l=b}}),m=this,t=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){t.apply(this,arguments);p();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=m.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
-b.substring(0,b.length-1));m.toolbar.setFontName(b);m.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var x=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){x.apply(this,arguments);p()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";
-if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(E){}var w=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var D="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],g=[],h;for(h in c.style)a[h]!=c.style[h]&&(b.push(c.style[h]),g.push(h));h=d.getModel().getStyle(c.cell);for(var f=null!=h?h.split(";"):[],l=0;l<f.length;l++){var m=f[l],
-p=m.indexOf("=");0<=p&&(h=m.substring(0,p),m=m.substring(p+1),null!=a[h]&&"none"==m&&(b.push(m),g.push(h)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var v=
-["fontFamily","fontSize","fontColor"],A="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),F=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],v,["opacity"],["align"],["html"]];for(a=0;a<F.length;a++)for(b=0;b<F[a].length;b++)D.push(F[a][b]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(D,y[a])&&D.push(y[a]);
-var P=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var g=b.isEdge(m),h=g?d.currentEdgeStyle:d.currentVertexStyle,g=["fontSize","fontFamily","fontColor"],f=0;f<g.length;f++){var l=h[g[f]];null!=l&&d.setCellStyles(g[f],l,a)}else for(l=0;l<a.length;l++){for(var m=a[l],p=b.getStyle(m),t=null!=p?p.split(";"):[],I=D.slice(),f=0;f<t.length;f++){var v=t[f],w=v.indexOf("=");if(0<=w){var k=v.substring(0,w),A=mxUtils.indexOf(I,k);0<=A&&I.splice(A,1);for(var x=0;x<F.length;x++){var r=F[x];if(0<=
-mxUtils.indexOf(r,k))for(var n=0;n<r.length;n++){var q=mxUtils.indexOf(I,r[n]);0<=q&&I.splice(q,1)}}}}for(var h=(g=b.isEdge(m))?d.currentEdgeStyle:d.currentVertexStyle,H=b.getStyle(m),f=0;f<I.length;f++){var k=I[f],E=h[k];null==E||"shape"==k&&!g||g&&!(0>mxUtils.indexOf(y,k))||(H=mxUtils.setStyle(H,k,E))}b.setStyle(m,H)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){P(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){P(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));P(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),g=!1,h=!1;if(0<b.length)for(var f=0;f<b.length&&(g=d.getModel().isVertex(b[f])||g,!(h=d.getModel().isEdge(b[f])||h)||!g);f++);else h=g=!0;for(var b=c.getProperty("keys"),l=c.getProperty("values"),f=0;f<b.length;f++){var m=0<=mxUtils.indexOf(v,b[f]);if("strokeColor"!=b[f]||null!=l[f]&&"none"!=
-l[f])if(0<=mxUtils.indexOf(y,b[f]))h||0<=mxUtils.indexOf(A,b[f])?null==l[f]?delete d.currentEdgeStyle[b[f]]:d.currentEdgeStyle[b[f]]=l[f]:g&&0<=mxUtils.indexOf(D,b[f])&&(null==l[f]?delete d.currentVertexStyle[b[f]]:d.currentVertexStyle[b[f]]=l[f]);else if(0<=mxUtils.indexOf(D,b[f])){if(g||m)null==l[f]?delete d.currentVertexStyle[b[f]]:d.currentVertexStyle[b[f]]=l[f];if(h||m||0<=mxUtils.indexOf(A,b[f]))null==l[f]?delete d.currentEdgeStyle[b[f]]:d.currentEdgeStyle[b[f]]=l[f]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+var c=!1,g=null,h=null,l=null,t=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=f}a=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==l)this.toolbar.createTextToolbar();else{for(var m=0;m<l.length;m++)this.toolbar.container.appendChild(l[m]);this.toolbar.fontMenu=g;this.toolbar.sizeMenu=
+h}c=d.cellEditor.isContentEditing();g=a;h=f;l=b}}),m=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);t();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=m.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
+b.substring(0,b.length-1));m.toolbar.setFontName(b);m.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var x=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){x.apply(this,arguments);t()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";
+if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(F){}var w=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var E="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],g=[],h;for(h in c.style)a[h]!=c.style[h]&&(b.push(c.style[h]),g.push(h));h=d.getModel().getStyle(c.cell);for(var f=null!=h?h.split(";"):[],l=0;l<f.length;l++){var m=f[l],
+t=m.indexOf("=");0<=t&&(h=m.substring(0,t),m=m.substring(t+1),null!=a[h]&&"none"==m&&(b.push(m),g.push(h)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var v=
+["fontFamily","fontSize","fontColor"],A="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),G=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],v,["opacity"],["align"],["html"]];for(a=0;a<G.length;a++)for(b=0;b<G[a].length;b++)E.push(G[a][b]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(E,y[a])&&E.push(y[a]);
+var Q=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var h=b.isEdge(m),g=h?d.currentEdgeStyle:d.currentVertexStyle,h=["fontSize","fontFamily","fontColor"],f=0;f<h.length;f++){var l=g[h[f]];null!=l&&d.setCellStyles(h[f],l,a)}else for(l=0;l<a.length;l++){for(var m=a[l],t=b.getStyle(m),q=null!=t?t.split(";"):[],J=E.slice(),f=0;f<q.length;f++){var v=q[f],w=v.indexOf("=");if(0<=w){var k=v.substring(0,w),A=mxUtils.indexOf(J,k);0<=A&&J.splice(A,1);for(var x=0;x<G.length;x++){var r=G[x];if(0<=
+mxUtils.indexOf(r,k))for(var n=0;n<r.length;n++){var p=mxUtils.indexOf(J,r[n]);0<=p&&J.splice(p,1)}}}}for(var g=(h=b.isEdge(m))?d.currentEdgeStyle:d.currentVertexStyle,I=b.getStyle(m),f=0;f<J.length;f++){var k=J[f],F=g[k];null==F||"shape"==k&&!h||h&&!(0>mxUtils.indexOf(y,k))||(I=mxUtils.setStyle(I,k,F))}b.setStyle(m,I)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){Q(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){Q(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));Q(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),h=!1,g=!1;if(0<b.length)for(var f=0;f<b.length&&(h=d.getModel().isVertex(b[f])||h,!(g=d.getModel().isEdge(b[f])||g)||!h);f++);else g=h=!0;for(var b=c.getProperty("keys"),l=c.getProperty("values"),f=0;f<b.length;f++){var m=0<=mxUtils.indexOf(v,b[f]);if("strokeColor"!=b[f]||null!=l[f]&&"none"!=
+l[f])if(0<=mxUtils.indexOf(y,b[f]))g||0<=mxUtils.indexOf(A,b[f])?null==l[f]?delete d.currentEdgeStyle[b[f]]:d.currentEdgeStyle[b[f]]=l[f]:h&&0<=mxUtils.indexOf(E,b[f])&&(null==l[f]?delete d.currentVertexStyle[b[f]]:d.currentVertexStyle[b[f]]=l[f]);else if(0<=mxUtils.indexOf(E,b[f])){if(h||m)null==l[f]?delete d.currentVertexStyle[b[f]]:d.currentVertexStyle[b[f]]=l[f];if(g||m||0<=mxUtils.indexOf(A,b[f]))null==l[f]?delete d.currentEdgeStyle[b[f]]:d.currentEdgeStyle[b[f]]=l[f]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||"12"),b=d.getView().getState(d.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,c=b.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);
-this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var b=c.getProperty("cells"),g=c.getProperty("parent");d.getModel().isLayer(g)&&!d.isCellVisible(g)&&null!=b&&0<b.length&&d.getModel().setVisible(g,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
+this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var b=c.getProperty("cells"),h=c.getProperty("parent");d.getModel().isLayer(h)&&!d.isCellVisible(h)&&null!=b&&0<b.length&&d.getModel().setVisible(h,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,
"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};
mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:208;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
@@ -2093,29 +2093,29 @@ EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=
EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var f=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):f.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(b){var f=null;b.cellEditor.isContentEditing()?document.execCommand("paste",
!1,null):f=d.apply(this,arguments);a.updatePasteActionStates();return f};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var n=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){n.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
-this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,g){if(null!=a.container){d=null!=d?d:0;g=null!=g?g:0;var h=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),l=a.view.translate,m=a.view.scale,p=mxRectangle.fromRectangle(h);
-p.x=p.x/m-l.x;p.y=p.y/m-l.y;p.width/=m;p.height/=m;var l=a.container.scrollTop,t=a.container.scrollLeft,v=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)v+=3;var y=a.container.offsetWidth-v,v=a.container.offsetHeight-v;c=c?Math.max(.3,Math.min(b||1,y/p.width)):m;b=(y-c*p.width)/2/c;var I=0==this.lightboxVerticalDivider?0:(v-c*p.height)/this.lightboxVerticalDivider/c;f&&(b=Math.max(b,0),I=Math.max(I,0));if(f||h.width<y||h.height<v)a.view.scaleAndTranslate(c,
-Math.floor(b-p.x),Math.floor(I-p.y)),a.container.scrollTop=l*c/m,a.container.scrollLeft=t*c/m;else if(0!=d||0!=g)h=a.view.translate,a.view.setTranslate(Math.floor(h.x+d/m),Math.floor(h.y+g/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
+this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,h){if(null!=a.container){d=null!=d?d:0;h=null!=h?h:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),l=a.view.translate,m=a.view.scale,t=mxRectangle.fromRectangle(g);
+t.x=t.x/m-l.x;t.y=t.y/m-l.y;t.width/=m;t.height/=m;var l=a.container.scrollTop,q=a.container.scrollLeft,v=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)v+=3;var y=a.container.offsetWidth-v,v=a.container.offsetHeight-v;c=c?Math.max(.3,Math.min(b||1,y/t.width)):m;b=(y-c*t.width)/2/c;var J=0==this.lightboxVerticalDivider?0:(v-c*t.height)/this.lightboxVerticalDivider/c;f&&(b=Math.max(b,0),J=Math.max(J,0));if(f||g.width<y||g.height<v)a.view.scaleAndTranslate(c,
+Math.floor(b-t.x),Math.floor(J-t.y)),a.container.scrollTop=l*c/m,a.container.scrollLeft=q*c/m;else if(0!=d||0!=h)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/m),Math.floor(g.y+h/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace=
"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||
0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var n=0,k=mxUtils.bind(this,function(a,c,b){n++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=b&&d.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);
-return d}),q=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),r=document.createElement("div");r.style.display="inline-block";r.style.verticalAlign="top";r.style.fontFamily="Helvetica,Arial";r.style.marginTop="8px";r.style.fontSize="14px";r.style.color="#ffffff";this.chromelessToolbar.appendChild(r);var u=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,
-mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(r.innerHTML="",mxUtils.write(r,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});q.style.paddingLeft="0px";q.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",q.style.display="",r.style.display="inline-block"):
-(u.style.display="none",q.style.display="none",r.style.display="none");c()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,
-function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var h=null,l=null,p=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);h=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);h=null;l=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";l=null}),600)}),a||200)}),m=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var t=k(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
-"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=t.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),x=a.getModel();x.addListener(mxEvent.CHANGE,function(){t.style.display=1<x.getChildCount(x.root)?
+return d}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),r=document.createElement("div");r.style.display="inline-block";r.style.verticalAlign="top";r.style.fontFamily="Helvetica,Arial";r.style.marginTop="8px";r.style.fontSize="14px";r.style.color="#ffffff";this.chromelessToolbar.appendChild(r);var u=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,
+mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(r.innerHTML="",mxUtils.write(r,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display="",r.style.display="inline-block"):
+(u.style.display="none",p.style.display="none",r.style.display="none");c()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,
+function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var h=null,l=null,t=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);h=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);h=null;l=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
+"none";l=null}),600)}),a||200)}),m=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var q=k(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
+"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=q.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),x=a.getModel();x.addListener(mxEvent.CHANGE,function(){q.style.display=1<x.getChildCount(x.root)?
"":"none"})}this.addChromelessToolbarItems(k);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||k(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var w=
this.lightboxToolbarActions[g];k(w.fn,w.icon,w.tooltip)}!a.lightbox||"1"!=urlParams.close&&this.container==document.body||k(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?
-"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||m(30),p())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():m(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():m(100);mxEvent.consume(a)}));
-mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||m(30)}));var D=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<D&&Math.abs(this.scrollTop-
-a.container.scrollTop)<D&&Math.abs(this.startX-b.getGraphX())<D&&Math.abs(this.startY-b.getGraphY())<D&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?p():m(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=
-a.y-(this.y0||0)*c.height}y.apply(this,arguments)};var v=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),g=Math.ceil(2*b.x+c.width*d.width),h=Math.ceil(2*b.y+c.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=g||f.height!=h)a.minimumGraphSize=new mxRectangle(0,0,g,h);g=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==g&&this.view.translate.y==
-b?v.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(g,b),a.container.scrollLeft+=Math.round((g-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var A=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
+"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||m(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():m(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():m(100);mxEvent.consume(a)}));
+mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||m(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-
+a.container.scrollTop)<E&&Math.abs(this.startX-b.getGraphX())<E&&Math.abs(this.startY-b.getGraphY())<E&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?t():m(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=
+a.y-(this.y0||0)*c.height}y.apply(this,arguments)};var v=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),h=Math.ceil(2*b.x+c.width*d.width),g=Math.ceil(2*b.y+c.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=h||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,h,g);h=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==h&&this.view.translate.y==
+b?v.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(h,b),a.container.scrollLeft+=Math.round((h-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var A=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,g=0;null!=A&&(d=a.container.offsetWidth/2-A.x+c.x,g=a.container.offsetHeight/2-A.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&f.chromelessResize(!1,null,d*(this.cumulativeZoomFactor-1),g*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==g||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-
-1),a.container.scrollTop-=g*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var d=mxEvent.getSource(c);null!=d;){if(d==a.container){A=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}d=d.parentNode}}))};
+this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,h=0;null!=A&&(d=a.container.offsetWidth/2-A.x+c.x,h=a.container.offsetHeight/2-A.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&f.chromelessResize(!1,null,d*(this.cumulativeZoomFactor-1),h*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==h||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-
+1),a.container.scrollTop-=h*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var d=mxEvent.getSource(c);null!=d;){if(d==a.container){A=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}d=d.parentNode}}))};
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
@@ -2141,15 +2141,15 @@ EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this
EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var n=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(a,b){n.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),f=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var n=0;n<k.length;n++){var q=k[n];a.getModel().isEdge(q)&&(d=!0);a.getModel().isVertex(q)&&(f=!0);if(d&&f)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(n=
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),f=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var n=0;n<k.length;n++){var p=k[n];a.getModel().isEdge(p)&&(d=!0);a.getModel().isVertex(p)&&(f=!0);if(d&&f)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(n=
0;n<k.length;n++)this.actions.get(k[n]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(f);this.actions.get("wordWrap").setEnabled(f);this.actions.get("autosize").setEnabled(f);d=f&&1==
a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);
this.actions.get("collapsible").setEnabled(f&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);
this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&f);this.menus.get("align").setEnabled(b&&
f&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&f&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),f=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var n=Math.max(0,Math.min(this.hsplitPosition,f-this.splitSize-20)),q=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",q+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",q+=this.toolbarHeight);0<q&&!mxClient.IS_QUIRKS&&(q+=1);var r=0;if(null!=this.sidebarFooterContainer){var u=
-this.footerHeight+k,r=Math.max(0,Math.min(d-q-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=n+"px";this.sidebarFooterContainer.style.height=r+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=n+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=u+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var n=Math.max(0,Math.min(this.hsplitPosition,f-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var r=0;if(null!=this.sidebarFooterContainer){var u=
+this.footerHeight+k,r=Math.max(0,Math.min(d-p-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=n+"px";this.sidebarFooterContainer.style.height=r+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=n+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=u+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
null!=this.hsplit.parentNode?n+this.splitSize+"px":"0px";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.footerHeight+k+"px";this.hsplit.style.left=n+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=
f+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-r+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,f-n-this.splitSize-u)+"px":f+"px",this.footerContainer.style.width=this.menubarContainer.style.width,r=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&
(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",r-=this.tabContainer.clientHeight),this.diagramContainer.style.height=r+"px",this.hsplit.style.height=r+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=u+"px",f=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,f=this.tabContainer.clientHeight),
@@ -2162,9 +2162,9 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,f,d){function k(a){if(null!=q){var h=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,r+(b?h.x-q.x:q.y-h.y)-f));mxEvent.consume(a);r!=g()&&(u=!0,c=null)}}function n(a){k(a);q=r=null}var q=null,r=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+f-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){q=new mxPoint(mxEvent.getClientX(a),
+EditorUi.prototype.addSplitHandler=function(a,b,f,d){function k(a){if(null!=p){var h=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,r+(b?h.x-p.x:p.y-h.y)-f));mxEvent.consume(a);r!=g()&&(u=!0,c=null)}}function n(a){k(a);p=r=null}var p=null,r=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+f-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
mxEvent.getClientY(a));r=g();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!u&&this.hsplitClickEnabled){var b=null!=c?c-f:0;c=g();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,n)})};
-EditorUi.prototype.showDialog=function(a,b,f,d,k,n,q,r,u){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,k,n,q,r,u);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showDialog=function(a,b,f,d,k,n,p,r,u){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,k,n,p,r,u);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var f=this.dialogs.pop();0==f.close(a,b)?this.dialogs.push(f):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),mxUtils.clearSelection(),this.editor.fireEvent(new mxEventObject("hideDialog")))}};
EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,d=f.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,a||"none",function(a){f.cellEditor.restoreSelection(d);b(a)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(n.container,230,k,!0,!1);n.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
@@ -2174,15 +2174,15 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,f=null;null
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(f){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
EditorUi.prototype.executeLayout=function(a,b,f){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(d.getModel().endUpdate(),null!=f&&f())}}};
-EditorUi.prototype.showImageDialog=function(a,b,f,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),n=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=n&&0<n.length){var q=new Image;q.onload=function(){f(n,q.width,q.height)};q.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=n}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.showImageDialog=function(a,b,f,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),n=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=n&&0<n.length){var p=new Image;p.onload=function(){f(n,p.width,p.height)};p.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=n}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,340,340,!0,!1,null,!1),a.init())};
EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var f=new Image;f.onload=function(){a(new mxImage(b,f.width,f.height))};f.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};f.src=b}else a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,f){mxUtils.confirm(a)?null!=b&&b():null!=f&&f()};
EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){q.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var g=d.getSelectionCells(),h=0;h<g.length;h++)if(d.getModel().isVertex(g[h])&&d.isCellResizable(g[h])){var f=d.getCellGeometry(g[h]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-c):38==a?f.height=Math.max(0,f.height-c):39==a?f.width+=c:40==a&&(f.height+=c),d.getModel().setGeometry(g[h],f))}}finally{d.getModel().endUpdate()}}else g=
+EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var g=d.getSelectionCells(),h=0;h<g.length;h++)if(d.getModel().isVertex(g[h])&&d.isCellResizable(g[h])){var f=d.getCellGeometry(g[h]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-c):38==a?f.height=Math.max(0,f.height-c):39==a?f.width+=c:40==a&&(f.height+=c),d.getModel().setGeometry(g[h],f))}}finally{d.getModel().endUpdate()}}else g=
d.getSelectionCell(),h=d.model.getParent(g),f=null,1==d.getSelectionCount()&&d.model.isVertex(g)&&null!=d.layoutManager&&!d.isCellLocked(g)&&(f=d.layoutManager.getLayout(h)),null!=f&&f.constructor==mxStackLayout?(f=h.getIndex(g),37==a||38==a?d.model.add(h,g,Math.max(0,f-1)):39!=a&&40!=a||d.model.add(h,g,Math.min(d.model.getChildCount(h),f+1))):(h=g=0,37==a?g=-c:38==a?h=-c:39==a?g=c:40==a&&(h=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),g,h))});null!=r&&window.clearTimeout(r);r=window.setTimeout(function(){if(0<
-q.length){d.getModel().beginUpdate();try{for(var a=0;a<q.length;a++)q[a]();q=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var f=this,d=this.editor.graph,k=new mxKeyHandler(d),n=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
-!mxClient.IS_SF)&&n.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],r=null,u={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
+p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var f=this,d=this.editor.graph,k=new mxKeyHandler(d),n=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+!mxClient.IS_SF)&&n.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],r=null,u={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
mxEvent.isAltDown(a)){var g=f.actions.get(f.altShiftActions[a.keyCode]);if(null!=g)return g.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=u[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),u[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&
d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return c.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,b,d){var g=this.actions.get(b);
null!=g&&(b=function(){g.isEnabled()&&g.funct()},c?d?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):d?k.bindShiftKey(a,b):k.bindKey(a,b))});var g=k.escape;k.escape=function(a){g.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,
@@ -2196,38 +2196,38 @@ EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),
(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,f){return null};
Graph=function(a,b,f,d,k){mxGraph.call(this,a,b,f,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var n=null,q=null,r=null,u=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var g=d.getState();null!=g&&this.model.isEdge(g.cell)&&(n=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(g.cell),r=g,q=d,null!=
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var n=null,p=null,r=null,u=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var g=d.getState();null!=g&&this.model.isEdge(g.cell)&&(n=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(g.cell),r=g,p=d,null!=
g.text&&null!=g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,d.getGraphX(),d.getGraphY())?u=mxEvent.LABEL_HANDLE:(g=this.selectionCellsHandler.getHandler(g.cell),null!=g&&null!=g.bends&&0<g.bends.length&&(u=g.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,g;for(g in d)if(null!=d[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(g=this.tolerance,null!=n&&null!=r&&null!=q){if(d=r,Math.abs(n.x-b.getGraphX())>g||Math.abs(n.y-b.getGraphY())>g){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var h=this.selectionCellsHandler.getHandler(d.cell);if(null!=h&&null!=h.bends&&0<h.bends.length){var f=h.getHandleForEvent(q),l=this.view.getEdgeStyle(d);g=l==mxEdgeStyle.EntityRelation;c||u!=mxEvent.LABEL_HANDLE||(f=u);if(g&&0!=f&&f!=h.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!g||
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(g=this.tolerance,null!=n&&null!=r&&null!=p){if(d=r,Math.abs(n.x-b.getGraphX())>g||Math.abs(n.y-b.getGraphY())>g){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var h=this.selectionCellsHandler.getHandler(d.cell);if(null!=h&&null!=h.bends&&0<h.bends.length){var f=h.getHandleForEvent(p),l=this.view.getEdgeStyle(d);g=l==mxEdgeStyle.EntityRelation;c||u!=mxEvent.LABEL_HANDLE||(f=u);if(g&&0!=f&&f!=h.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!g||
null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=d.visibleSourceState||f==h.bends.length-1||null!=d.visibleTargetState)g||f==mxEvent.LABEL_HANDLE||(g=d.absolutePoints,null!=g&&(null==l&&null==f||l==mxEdgeStyle.OrthConnector)&&(f=u,null==f&&(f=new mxRectangle(n.x,n.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,g[0].x,g[0].y)?f=0:mxUtils.contains(f,g[g.length-1].x,g[g.length-1].y)?
-f=h.bends.length-1:null!=l&&(2==g.length||3==g.length&&(0==Math.round(g[0].x-g[1].x)&&0==Math.round(g[1].x-g[2].x)||0==Math.round(g[0].y-g[1].y)&&0==Math.round(g[1].y-g[2].y)))?f=2:(f=mxUtils.findNearestSegment(d,n.x,n.y),f=null==l?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),h.start(b.getGraphX(),b.getGraphX(),f),u=n=q=r=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){h=null;g=d.absolutePoints;if(null!=g)if(f=new mxRectangle(b.getGraphX(),
+f=h.bends.length-1:null!=l&&(2==g.length||3==g.length&&(0==Math.round(g[0].x-g[1].x)&&0==Math.round(g[1].x-g[2].x)||0==Math.round(g[0].y-g[1].y)&&0==Math.round(g[1].y-g[2].y)))?f=2:(f=mxUtils.findNearestSegment(d,n.x,n.y),f=null==l?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),h.start(b.getGraphX(),b.getGraphX(),f),u=n=p=r=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){h=null;g=d.absolutePoints;if(null!=g)if(f=new mxRectangle(b.getGraphX(),
b.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))h="move";else if(mxUtils.contains(f,g[0].x,g[0].y)||mxUtils.contains(f,g[g.length-1].x,g[g.length-1].y))h="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)l=this.view.getEdgeStyle(d),h="crosshair",l!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(l=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
-l<g.length-1&&0<=l&&(h=0==Math.round(g[l].x-g[l+1].x)?"col-resize":"row-resize"));null!=h&&d.setCursor(h)}}),mouseUp:mxUtils.bind(this,function(a,c){u=n=q=r=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+l<g.length-1&&0<=l&&(h=0==Math.round(g[l].x-g[l+1].x)?"col-resize":"row-resize"));null!=h&&d.setCursor(h)}}),mouseUp:mxUtils.bind(this,function(a,c){u=n=p=r=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
function(){var a=g.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,h=b.width*d,b=b.height*d,d=this.graph.view.translate,f=this.graph.view.scale,l=this.graph.getPageLayout(),m=0;m<l.width;m++)c.push(new mxRectangle(((l.x+m)*h+d.x)*f,(l.y*b+d.y)*f,h*f,b*f));for(m=0;m<l.height;m++)c.push(new mxRectangle((l.x*h+d.x)*f,((l.y+m)*b+d.y)*f,h*f,b*f));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],d=0;d<c.length;d++){var g=this.graph.view.getState(c[d]),g=null!=g?g.style:this.graph.getCellStyle(c[d]);
"1"==mxUtils.getValue(g,"part","0")?(g=this.graph.model.getParent(c[d]),this.graph.model.isVertex(g)&&0>mxUtils.indexOf(c,g)&&b.push(g)):b.push(c[d])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var h=new mxRubberband(this);
-this.getRubberband=function(){return h};var l=(new Date).getTime(),p=0,m=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;m.apply(this,arguments);a!=this.currentState?(l=(new Date).getTime(),p=0):p=(new Date).getTime()-l};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<p||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&t.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=h.isForceRubberbandEvent;h.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var D=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(D=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=D)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return y.apply(this,
+this.getRubberband=function(){return h};var l=(new Date).getTime(),t=0,m=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;m.apply(this,arguments);a!=this.currentState?(l=(new Date).getTime(),t=0):t=(new Date).getTime()-l};var q=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<t||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&q.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=h.isForceRubberbandEvent;h.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return y.apply(this,
arguments);c=c?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)))};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var v=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=
-this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,g,h){h=null!=h?h:[];if(0<b||0<d){var f=this.getModel(),l=a+b,m=c+d;null==g&&(g=this.getCurrentRoot(),null==g&&(g=f.getRoot()));if(null!=g)for(var p=f.getChildCount(g),I=0;I<p;I++){var t=f.getChildAt(g,I),v=this.view.getState(t);if(null!=
-v&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(v.style,"locked","0")){var y=mxUtils.getValue(v.style,mxConstants.STYLE_ROTATION)||0;0!=y&&(v=mxUtils.getBoundingBox(v,y));(f.isEdge(t)||f.isVertex(t))&&v.x>=a&&v.y+v.height<=m&&v.y>=c&&v.x+v.width<=l&&h.push(t);this.getAllCells(a,c,b,d,t,h)}}}return h};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=
-this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();F=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=
-c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),h.start(b.x,b.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);F=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var P=this.updateMouseEvent;this.updateMouseEvent=function(a){a=P.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
+this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,g,h){h=null!=h?h:[];if(0<b||0<d){var f=this.getModel(),l=a+b,m=c+d;null==g&&(g=this.getCurrentRoot(),null==g&&(g=f.getRoot()));if(null!=g)for(var t=f.getChildCount(g),J=0;J<t;J++){var q=f.getChildAt(g,J),v=this.view.getState(q);if(null!=
+v&&this.isCellVisible(q)&&"1"!=mxUtils.getValue(v.style,"locked","0")){var y=mxUtils.getValue(v.style,mxConstants.STYLE_ROTATION)||0;0!=y&&(v=mxUtils.getBoundingBox(v,y));(f.isEdge(q)||f.isVertex(q))&&v.x>=a&&v.y+v.height<=m&&v.y>=c&&v.x+v.width<=l&&h.push(q);this.getAllCells(a,c,b,d,q,h)}}}return h};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=
+this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var G=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();G=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=
+c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),h.start(b.x,b.y)):null!=G?this.addSelectionCells(G):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);G=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var Q=this.updateMouseEvent;this.updateMouseEvent=function(a){a=Q.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,f){f=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,b)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,n=null,q=mxUtils.bind(this,function(a){k=!0;n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),r=mxUtils.bind(this,function(a){k=k&&null!=n&&Math.abs(n.x-mxEvent.getClientX(a))<b&&Math.abs(n.y-mxEvent.getClientY(a))<b}),u=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
-b&&b!=f.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(f.node,q,r,u);mxEvent.addListener(f.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,f,q,r,u){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
-b,f,q,r,u){q=null!=q?q:!0;r=null!=r?r:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var c=this.model.getChildCount(f)-1;0<=c;c--){var d=this.model.getChildAt(f,c),h=this.getScaledCellAt(a,b,d,q,r,u);if(null!=h)return h;if(this.isCellVisible(d)&&(r&&this.model.isEdge(d)||q&&this.model.isVertex(d))&&(h=this.view.getState(d),null!=h&&(null==u||!u(h,a,b))&&this.intersects(h,a,b)))return d}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,n=null,p=mxUtils.bind(this,function(a){k=!0;n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),r=mxUtils.bind(this,function(a){k=k&&null!=n&&Math.abs(n.x-mxEvent.getClientX(a))<b&&Math.abs(n.y-mxEvent.getClientY(a))<b}),u=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
+b&&b!=f.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(f.node,p,r,u);mxEvent.addListener(f.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,f,p,r,u){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
+b,f,p,r,u){p=null!=p?p:!0;r=null!=r?r:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var c=this.model.getChildCount(f)-1;0<=c;c--){var d=this.model.getChildAt(f,c),h=this.getScaledCellAt(a,b,d,p,r,u);if(null!=h)return h;if(this.isCellVisible(d)&&(r&&this.model.isEdge(d)||p&&this.model.isVertex(d))&&(h=this.view.getState(d),null!=h&&(null==u||!u(h,a,b))&&this.intersects(h,a,b)))return d}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,f=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*f,(a.y+b.y)*f,a.width*f,a.height*f);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=
function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();
-if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");a.setAttribute("transform","scale("+this.currentScale+","+this.currentScale+")translate("+this.currentTranslate.x+","+this.currentTranslate.y+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var f=a.style.display;a.style.display="none";a.getBBox();a.style.display=f}}catch(q){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
+if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");a.setAttribute("transform","scale("+this.currentScale+","+this.currentScale+")translate("+this.currentTranslate.x+","+this.currentTranslate.y+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var f=a.style.display;a.style.display="none";a.getBBox();a.style.display=f}}catch(p){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,f=this.scale,n=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=f,this.translate=n)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,n){var d=this.useCssTransforms,k=this.view.scale,u=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
!1);f.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=u,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,b,f){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(f)}};
Graph.prototype.openLink=function(a,b,f){var d=window;"_self"==b&&window!=window.top?window.location.href=a:a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top?(a=a.split("#")[1],window.location.hash=="#"+a&&(window.location.hash=""),window.location.hash=a):(d=window.open(a,b),null==d||f||(d.opener=null));return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
@@ -2244,30 +2244,30 @@ Graph.prototype.isSplitTarget=function(a,b,f){return!this.model.isEdge(b[0])&&!m
Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,q=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var r=f?"getUTC":"get",u=a[r+"Date"](),c=a[r+"Day"](),g=a[r+"Month"](),h=a[r+"FullYear"](),l=a[r+"Hours"](),p=a[r+"Minutes"](),m=a[r+"Seconds"](),r=a[r+"Milliseconds"](),t=f?0:a.getTimezoneOffset(),x={d:u,dd:q(u),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:g+1,mm:q(g+1),mmm:d.i18n.monthNames[g],mmmm:d.i18n.monthNames[g+
-12],yy:String(h).slice(2),yyyy:h,h:l%12||12,hh:q(l%12||12),H:l,HH:q(l),M:p,MM:q(p),s:m,ss:q(m),l:q(r,3),L:q(99<r?Math.round(r/10):r),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(n,""),o:(0<t?"-":"+")+q(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var r=f?"getUTC":"get",u=a[r+"Date"](),c=a[r+"Day"](),g=a[r+"Month"](),h=a[r+"FullYear"](),l=a[r+"Hours"](),t=a[r+"Minutes"](),m=a[r+"Seconds"](),r=a[r+"Milliseconds"](),q=f?0:a.getTimezoneOffset(),x={d:u,dd:p(u),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:g+1,mm:p(g+1),mmm:d.i18n.monthNames[g],mmmm:d.i18n.monthNames[g+
+12],yy:String(h).slice(2),yyyy:h,h:l%12||12,hh:p(l%12||12),H:l,HH:p(l),M:t,MM:p(t),s:m,ss:p(m),l:p(r,3),L:p(99<r?Math.round(r/10):r),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(n,""),o:(0<q?"-":"+")+p(100*Math.floor(Math.abs(q)/60)+Math.abs(q)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),f=b.getChildCount(b.root),d=0;d<f;d++)mxUtils.bind(this,function(d){var f=document.createElement("div");f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.padding="2px";f.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),
k.defaultChecked=!0);f.appendChild(k);var r=this.convertValueToString(d)||mxResources.get("background")||"Background";f.setAttribute("title",r);mxUtils.write(f,r);a.appendChild(f);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
-Graph.prototype.replacePlaceholders=function(a,b){var f=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var n=null;if(match.index>d&&"%"==b.charAt(match.index-1))n=k.substring(1);else{var q=k.substring(1,k.length-1);if(0>q.indexOf("{"))for(var r=a;null==n&&null!=r;)null!=r.value&&"object"==typeof r.value&&(n=r.hasAttribute(q)?null!=r.getAttribute(q)?r.getAttribute(q):"":null),r=this.model.getParent(r);null==n&&(n=this.getGlobalVariable(q))}f.push(b.substring(d,
+Graph.prototype.replacePlaceholders=function(a,b){var f=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var n=null;if(match.index>d&&"%"==b.charAt(match.index-1))n=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var r=a;null==n&&null!=r;)null!=r.value&&"object"==typeof r.value&&(n=r.hasAttribute(p)?null!=r.getAttribute(p)?r.getAttribute(p):"":null),r=this.model.getParent(r);null==n&&(n=this.getGlobalVariable(p))}f.push(b.substring(d,
match.index)+(null!=n?n:k));d=match.index+k.length}}f.push(b.substring(d))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,b,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=f&&(mxEvent.isTouchEvent(b)?f.update(f.getState(this.view.getState(a[1]))):f.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,b,f,d,k,n){n=n?n:!1;var q=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(q.x+=a.geometry.width/2,q.y-=f):b==mxConstants.DIRECTION_SOUTH?(q.x+=a.geometry.width/2,q.y+=a.geometry.height+f):(q.x=b==mxConstants.DIRECTION_WEST?q.x-f:q.x+(a.geometry.width+f),q.y+=a.geometry.height/2);f=this.view.getState(this.model.getParent(a));
-var r=this.view.scale,u=this.view.translate,c=u.x*r,u=u.y*r;this.model.isVertex(f.cell)&&(c=f.x,u=f.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(q.x+=a.parent.geometry.x,q.y+=a.parent.geometry.y);n=n||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+q.x*r,u+q.y*r);this.model.isAncestor(n,a)&&(n=null);for(f=n;null!=f;){if(this.isCellLocked(f)){n=null;break}f=this.model.getParent(f)}null!=n&&(f=this.view.getState(a),r=this.view.getState(n),null!=f&&null!=r&&mxUtils.intersects(f,r)&&(n=
-null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?q.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?q.y+=a.geometry.height/2:q.x=b==mxConstants.DIRECTION_WEST?q.x-a.geometry.width/2:q.x+a.geometry.width/2;null==n||this.isCellConnectable(n)||(f=this.getModel().getParent(n),this.getModel().isVertex(f)&&this.isCellConnectable(f)&&(n=f));if(n==a||this.model.isEdge(n)||!this.isCellConnectable(n))n=null;f=[];this.model.beginUpdate();try{r=n;if(null==r&&k){for(var c=a,g=this.getCellGeometry(a);null!=
-g&&g.relative;)c=this.getModel().getParent(c),g=this.getCellGeometry(c);var h=this.view.getState(c),l=null!=h?h.style:this.getCellStyle(c);if(mxUtils.getValue(l,"part",!1)){var p=this.model.getParent(c);this.model.isVertex(p)&&(c=p)}r=this.duplicateCells([c],!1)[0];g=this.getCellGeometry(r);null!=g&&(g.x=q.x-g.width/2,g.y=q.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var m=mxEvent.isControlDown(d)&&k||null==n&&null!=g&&g.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,r,this.createCurrentEdgeStyle());if(null!=m&&this.connectionHandler.insertBeforeSource){var t=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=m.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==m.parent&&(t=d.parent.getIndex(d),this.model.add(d.parent,m,t))}null==n&&null!=r&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(t=a.parent.getIndex(a),this.model.add(a.parent,
-r,t));null!=m&&f.push(m);null==n&&null!=r&&f.push(r);null==r&&null!=m&&m.geometry.setTerminalPoint(q,!1);null!=m&&this.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{this.model.endUpdate()}return f};
+Graph.prototype.connectVertex=function(a,b,f,d,k,n){n=n?n:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=f):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+f):(p.x=b==mxConstants.DIRECTION_WEST?p.x-f:p.x+(a.geometry.width+f),p.y+=a.geometry.height/2);f=this.view.getState(this.model.getParent(a));
+var r=this.view.scale,u=this.view.translate,c=u.x*r,u=u.y*r;this.model.isVertex(f.cell)&&(c=f.x,u=f.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);n=n||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+p.x*r,u+p.y*r);this.model.isAncestor(n,a)&&(n=null);for(f=n;null!=f;){if(this.isCellLocked(f)){n=null;break}f=this.model.getParent(f)}null!=n&&(f=this.view.getState(a),r=this.view.getState(n),null!=f&&null!=r&&mxUtils.intersects(f,r)&&(n=
+null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==n||this.isCellConnectable(n)||(f=this.getModel().getParent(n),this.getModel().isVertex(f)&&this.isCellConnectable(f)&&(n=f));if(n==a||this.model.isEdge(n)||!this.isCellConnectable(n))n=null;f=[];this.model.beginUpdate();try{r=n;if(null==r&&k){for(var c=a,g=this.getCellGeometry(a);null!=
+g&&g.relative;)c=this.getModel().getParent(c),g=this.getCellGeometry(c);var h=this.view.getState(c),l=null!=h?h.style:this.getCellStyle(c);if(mxUtils.getValue(l,"part",!1)){var t=this.model.getParent(c);this.model.isVertex(t)&&(c=t)}r=this.duplicateCells([c],!1)[0];g=this.getCellGeometry(r);null!=g&&(g.x=p.x-g.width/2,g.y=p.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var m=mxEvent.isControlDown(d)&&k||null==n&&null!=g&&g.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,r,this.createCurrentEdgeStyle());if(null!=m&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=m.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==m.parent&&(q=d.parent.getIndex(d),this.model.add(d.parent,m,q))}null==n&&null!=r&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(q=a.parent.getIndex(a),this.model.add(a.parent,
+r,q));null!=m&&f.push(m);null==n&&null!=r&&f.push(r);null==r&&null!=m&&m.geometry.setTerminalPoint(p,!1);null!=m&&this.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{this.model.endUpdate()}return f};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],f,d;for(d in this.model.cells)if(f=this.model.cells[d],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(a.innerHTML=this.getLabel(f),f=mxUtils.extractTextWithWhitespace([a])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&b.push(f);return b.join(" ")};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),f=a,d=null;null==d&&null!=f;)null!=f.value&&"object"==typeof f.value&&(d=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f);return d||""}return a.value.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!f.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,b,f,d,k){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<f.length;n++){var q=this.view.getState(f[n]),r=this.getCellGeometry(f[n]);if(null!=q&&null!=r){var u=Math.round(r.width-q.width/this.view.scale),c=Math.round(r.height-q.height/this.view.scale);if(0!=c||0!=u){var g=this.model.getParent(f[n]),h=this.layoutManager.getLayout(g);
-null==h?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(q,g,u,c):null!=k&&mxEvent.isAltDown(k)||h.constructor!=mxStackLayout||h.resizeLast||this.resizeParentStacks(g,h,u,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
-Graph.prototype.moveSiblings=function(a,b,f,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var n=this.view.getState(k[b]),q=this.getCellGeometry(k[b]);null!=n&&null!=q&&(q=q.clone(),q.translate(Math.round(f*Math.max(0,Math.min(1,(n.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(n.y-a.y)/a.height)))),this.model.setGeometry(k[b],q))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,f,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var n=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=n&&(n=n.clone(),b.horizontal?n.width+=f+Math.min(0,q.width/this.view.scale-n.width):n.height+=d+Math.min(0,q.height/this.view.scale-n.height),this.model.setGeometry(a,
+Graph.prototype.foldCells=function(a,b,f,d,k){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<f.length;n++){var p=this.view.getState(f[n]),r=this.getCellGeometry(f[n]);if(null!=p&&null!=r){var u=Math.round(r.width-p.width/this.view.scale),c=Math.round(r.height-p.height/this.view.scale);if(0!=c||0!=u){var g=this.model.getParent(f[n]),h=this.layoutManager.getLayout(g);
+null==h?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,g,u,c):null!=k&&mxEvent.isAltDown(k)||h.constructor!=mxStackLayout||h.resizeLast||this.resizeParentStacks(g,h,u,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
+Graph.prototype.moveSiblings=function(a,b,f,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var n=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=n&&null!=p&&(p=p.clone(),p.translate(Math.round(f*Math.max(0,Math.min(1,(n.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(n.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,f,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var n=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=n&&(n=n.clone(),b.horizontal?n.width+=f+Math.min(0,p.width/this.view.scale-n.width):n.height+=d+Math.min(0,p.height/this.view.scale-n.height),this.model.setGeometry(a,
n));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,f){f=f||this.getDefaultParent();this.isCellLocked(f)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,f){f=f||this.getDefaultParent();return this.isCellLocked(f)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
@@ -2311,23 +2311,23 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activa
this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this,arguments);null!=
d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var f=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return f.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var f=function(c,b,g){var h=new mxPoint(b,g);h.type=c;d.push(h);h=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==h||h.type!=c||h.x!=b||h.y!=g},p=.5*this.scale,b=!1,d=[],m=0;m<c.length-1;m++){for(var t=c[m+1],k=c[m],w=[],r=c[m+2];m<
-c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,t.x,t.y)<1*this.scale*this.scale;)t=r,m++,r=c[m+2];for(var b=f(0,k.x,k.y)||b,y=0;y<this.validEdges.length;y++){var v=this.validEdges[y],A=v.absolutePoints;if(null!=A&&mxUtils.intersects(a,v)&&"1"!=v.style.noJump)for(v=0;v<A.length-1;v++){for(var n=A[v+1],q=A[v],r=A[v+2];v<A.length-2&&mxUtils.ptSegDistSq(q.x,q.y,r.x,r.y,n.x,n.y)<1*this.scale*this.scale;)n=r,v++,r=A[v+2];r=mxUtils.intersection(k.x,k.y,t.x,t.y,q.x,q.y,n.x,n.y);if(null!=r&&(Math.abs(r.x-
-q.x)>p||Math.abs(r.y-q.y)>p)&&(Math.abs(r.x-n.x)>p||Math.abs(r.y-n.y)>p)){n=r.x-k.x;q=r.y-k.y;r={distSq:n*n+q*q,x:r.x,y:r.y};for(n=0;n<w.length;n++)if(w[n].distSq>r.distSq){w.splice(n,0,r);r=null;break}null==r||0!=w.length&&w[w.length-1].x===r.x&&w[w.length-1].y===r.y||w.push(r)}}}for(v=0;v<w.length;v++)b=f(1,w[v].x,w[v].y)||b}r=c[c.length-1];b=f(0,r.x,r.y)||b}a.routedPoints=d;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){this.routedPoints=
-null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,"jumpStyle","none"),m,t=!0,r=null,w=null;m=[];var n=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var v=
-this.state.routedPoints[y],A=new mxPoint(v.x/this.scale,v.y/this.scale);0==y?A=c[0]:y==this.state.routedPoints.length-1&&(A=c[c.length-1]);var q=!1;if(null!=r&&1==v.type){var u=this.state.routedPoints[y+1],v=u.x/this.scale-A.x,u=u.y/this.scale-A.y,v=v*v+u*u;null==n&&(n=new mxPoint(A.x-r.x,A.y-r.y),w=Math.sqrt(n.x*n.x+n.y*n.y),n.x=n.x*g/w,n.y=n.y*g/w);v>g*g&&0<w&&(v=r.x-A.x,u=r.y-A.y,v=v*v+u*u,v>g*g&&(q=new mxPoint(A.x-n.x,A.y-n.y),v=new mxPoint(A.x+n.x,A.y+n.y),m.push(q),this.addPoints(a,m,b,d,!1,
-null,t),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,t=!1,"sharp"==f?(a.lineTo(q.x-n.y*m,q.y+n.x*m),a.lineTo(v.x-n.y*m,v.y+n.x*m),a.lineTo(v.x,v.y)):"arc"==f?(m*=1.3,a.curveTo(q.x-n.y*m,q.y+n.x*m,v.x-n.y*m,v.y+n.x*m,v.x,v.y)):(a.moveTo(v.x,v.y),t=!0),m=[v],q=!0))}else n=null;q||(m.push(A),r=A)}this.addPoints(a,m,b,d,!1,null,t);a.stroke()}};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==
-a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)n.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var g=this.getNextPoint(a,b,d),f=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),t=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=h)var k=Math.cos(-h),w=Math.sin(-h),g=mxUtils.getRotatedPoint(g,k,w,t);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);g=this.getPerimeterPoint(c,g,0==h&&f,k);0!=h&&(k=Math.cos(h),w=Math.sin(h),g=mxUtils.getRotatedPoint(g,k,w,t));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,g),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,f){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;if(null!=a)for(var g=0;g<a.length;g++){var h=this.graph.getConnectionPoint(c,a[g]);if(null!=h){var l=(h.x-f.x)*(h.x-f.x)+(h.y-f.y)*(h.y-f.y);if(null==d||l<d)b=h,d=l}}null!=b&&(f=b)}return f};
-var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var r=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var f=function(c,b,g){var h=new mxPoint(b,g);h.type=c;d.push(h);h=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==h||h.type!=c||h.x!=b||h.y!=g},t=.5*this.scale,b=!1,d=[],m=0;m<c.length-1;m++){for(var q=c[m+1],k=c[m],w=[],r=c[m+2];m<
+c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,q.x,q.y)<1*this.scale*this.scale;)q=r,m++,r=c[m+2];for(var b=f(0,k.x,k.y)||b,y=0;y<this.validEdges.length;y++){var v=this.validEdges[y],A=v.absolutePoints;if(null!=A&&mxUtils.intersects(a,v)&&"1"!=v.style.noJump)for(v=0;v<A.length-1;v++){for(var n=A[v+1],p=A[v],r=A[v+2];v<A.length-2&&mxUtils.ptSegDistSq(p.x,p.y,r.x,r.y,n.x,n.y)<1*this.scale*this.scale;)n=r,v++,r=A[v+2];r=mxUtils.intersection(k.x,k.y,q.x,q.y,p.x,p.y,n.x,n.y);if(null!=r&&(Math.abs(r.x-
+p.x)>t||Math.abs(r.y-p.y)>t)&&(Math.abs(r.x-n.x)>t||Math.abs(r.y-n.y)>t)){n=r.x-k.x;p=r.y-k.y;r={distSq:n*n+p*p,x:r.x,y:r.y};for(n=0;n<w.length;n++)if(w[n].distSq>r.distSq){w.splice(n,0,r);r=null;break}null==r||0!=w.length&&w[w.length-1].x===r.x&&w[w.length-1].y===r.y||w.push(r)}}}for(v=0;v<w.length;v++)b=f(1,w[v].x,w[v].y)||b}r=c[c.length-1];b=f(0,r.x,r.y)||b}a.routedPoints=d;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){this.routedPoints=
+null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,"jumpStyle","none"),m,q=!0,r=null,w=null;m=[];var n=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var v=
+this.state.routedPoints[y],A=new mxPoint(v.x/this.scale,v.y/this.scale);0==y?A=c[0]:y==this.state.routedPoints.length-1&&(A=c[c.length-1]);var p=!1;if(null!=r&&1==v.type){var u=this.state.routedPoints[y+1],v=u.x/this.scale-A.x,u=u.y/this.scale-A.y,v=v*v+u*u;null==n&&(n=new mxPoint(A.x-r.x,A.y-r.y),w=Math.sqrt(n.x*n.x+n.y*n.y),n.x=n.x*g/w,n.y=n.y*g/w);v>g*g&&0<w&&(v=r.x-A.x,u=r.y-A.y,v=v*v+u*u,v>g*g&&(p=new mxPoint(A.x-n.x,A.y-n.y),v=new mxPoint(A.x+n.x,A.y+n.y),m.push(p),this.addPoints(a,m,b,d,!1,
+null,q),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,q=!1,"sharp"==f?(a.lineTo(p.x-n.y*m,p.y+n.x*m),a.lineTo(v.x-n.y*m,v.y+n.x*m),a.lineTo(v.x,v.y)):"arc"==f?(m*=1.3,a.curveTo(p.x-n.y*m,p.y+n.x*m,v.x-n.y*m,v.y+n.x*m,v.x,v.y)):(a.moveTo(v.x,v.y),q=!0),m=[v],p=!0))}else n=null;p||(m.push(A),r=A)}this.addPoints(a,m,b,d,!1,null,q);a.stroke()}};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==
+a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)n.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var g=this.getNextPoint(a,b,d),h=this.graph.isOrthogonal(a),f=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),q=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=f)var k=Math.cos(-f),w=Math.sin(-f),g=mxUtils.getRotatedPoint(g,k,w,q);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);g=this.getPerimeterPoint(c,g,0==f&&h,k);0!=f&&(k=Math.cos(f),w=Math.sin(f),g=mxUtils.getRotatedPoint(g,k,w,q));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,g),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,f){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;if(null!=a)for(var g=0;g<a.length;g++){var h=this.graph.getConnectionPoint(c,a[g]);if(null!=h){var l=(h.x-f.x)*(h.x-f.x)+(h.y-f.y)*(h.y-f.y);if(null==d||l<d)b=h,d=l}}null!=b&&(f=b)}return f};
+var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var r=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=
c.substring(8,c.length-1),d=mxUtils.parseXml(a.view.graph.decompress(b));return new mxShape(new mxStencil(d.documentElement))}catch(l){null!=window.console&&console.log("Error in shape: "+l)}}return r.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var n=
-mxUtils.load(k);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",k,q)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxUtils.load(k);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],f=2;f<a.length-1;f++)b+="/"+a[f];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,f,d){var k=mxStencilRegistry.packages[a];if(null!=f&&f||null==k){var n=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,n=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,n))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;n=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!=
+mxStencilRegistry.loadStencilSet=function(a,b,f,d){var k=mxStencilRegistry.packages[a];if(null!=f&&f||null==k){var n=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,n=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,n))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;n=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!=
k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,n)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,f),d=d.nextSibling;else{f=null!=f?f:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),n=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(k+n.toLowerCase(),new mxStencil(d));if(null!=b){var q=d.getAttribute("w"),
-r=d.getAttribute("h"),q=null==q?80:parseInt(q,10),r=null==r?80:parseInt(r,10);b(k,n,a,q,r)}}d=d.nextSibling}}};
+mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,f),d=d.nextSibling;else{f=null!=f?f:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),n=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(k+n.toLowerCase(),new mxStencil(d));if(null!=b){var p=d.getAttribute("w"),
+r=d.getAttribute("h"),p=null==p?80:parseInt(p,10),r=null==r?80:parseInt(r,10);b(k,n,a,p,r)}}d=d.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR=
"#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||
b.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));
@@ -2335,64 +2335,64 @@ for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[
a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=null;return b});return a};mxConnectionHandler.prototype.isCellEnabled=function(a){return!this.graph.isCellLocked(a)};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&
(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&
null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};
-Graph.prototype.importGraphModel=function(a,c,b,d){c=null!=c?c:0;b=null!=b?b:0;var g=new mxCodec(a.ownerDocument),f=new mxGraphModel;g.decode(a,f);a=[];g=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges()));if(null!=g){g=g.slice();this.model.beginUpdate();try{if(1!=g.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<g.length;f++)a=a.concat(this.model.getChildren(this.moveCells([g[f]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(f.getChildren(g[0]),c,b,!1,this.getDefaultParent());
-if(d){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var h=this.getBoundingBoxFromGeometry(a,!0);null!=h&&this.moveCells(a,c-h.x,b-h.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=null;if(null!=a.shape){var d=a.shape.direction,g=a.shape.bounds,f=a.shape.scale,b=g.width/f,g=g.height/f;if(d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH)var h=b,b=g,g=h;b=a.shape.getConstraints(a.style,b,g)}if(null!=b)return b;
-b=mxUtils.getValue(a.style,"points",null);if(null!=b){d=[];try{for(var l=JSON.parse(b),b=0;b<l.length;b++)h=l[b],d.push(new mxConnectionConstraint(new mxPoint(h[0],h[1]),2<h.length?"0"!=h[2]:!0,null,3<h.length?h[3]:0,4<h.length?h[4]:0))}catch(K){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),
+Graph.prototype.importGraphModel=function(a,c,b,d){c=null!=c?c:0;b=null!=b?b:0;var g=new mxCodec(a.ownerDocument),h=new mxGraphModel;g.decode(a,h);a=[];g=h.getChildren(this.cloneCell(h.root,this.isCloneInvalidEdges()));if(null!=g){g=g.slice();this.model.beginUpdate();try{if(1!=g.length||this.isCellLocked(this.getDefaultParent()))for(h=0;h<g.length;h++)a=a.concat(this.model.getChildren(this.moveCells([g[h]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(h.getChildren(g[0]),c,b,!1,this.getDefaultParent());
+if(d){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var f=this.getBoundingBoxFromGeometry(a,!0);null!=f&&this.moveCells(a,c-f.x,b-f.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=null;if(null!=a.shape){var d=a.shape.direction,g=a.shape.bounds,h=a.shape.scale,b=g.width/h,g=g.height/h;if(d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH)var f=b,b=g,g=f;b=a.shape.getConstraints(a.style,b,g)}if(null!=b)return b;
+b=mxUtils.getValue(a.style,"points",null);if(null!=b){d=[];try{for(var l=JSON.parse(b),b=0;b<l.length;b++)f=l[b],d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}catch(L){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),
c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,d=0;d<c;d++){var g=this.model.getChildAt(a,d);this.model.isVertex(g)&&(g=this.getCellGeometry(g),null==g||g.relative||b++)}return 0<b||this.isContainer(a)};
Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();
-try{for(var d=0;d<a.length;d++){var g=a[d];if(c.isEdge(g)){var f=c.getTerminal(g,!0),h=c.getTerminal(g,!1);c.setTerminal(g,h,!0);c.setTerminal(g,f,!1);var l=c.getGeometry(g);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var m=l.getTerminalPoint(!0),p=l.getTerminalPoint(!1);l.setTerminalPoint(m,!1);l.setTerminalPoint(p,!0);c.setGeometry(g,l);var t=this.view.getState(g),v=this.view.getState(f),y=this.view.getState(h);if(null!=t){var I=null!=v?this.getConnectionConstraint(t,v,!0):null,k=
-null!=y?this.getConnectionConstraint(t,y,!1):null;this.setConnectionConstraint(g,f,!0,k);this.setConnectionConstraint(g,h,!1,I)}b.push(g)}}else if(c.isVertex(g)&&(l=this.getCellGeometry(g),null!=l)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var w=l.width;l.width=l.height;l.height=w;c.setGeometry(g,l);var A=this.view.getState(g);if(null!=A){var r=A.style[mxConstants.STYLE_DIRECTION]||"east";"east"==r?r="south":"south"==r?r="west":"west"==r?r="north":"north"==r&&(r="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,
+try{for(var d=0;d<a.length;d++){var g=a[d];if(c.isEdge(g)){var h=c.getTerminal(g,!0),f=c.getTerminal(g,!1);c.setTerminal(g,f,!0);c.setTerminal(g,h,!1);var l=c.getGeometry(g);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var m=l.getTerminalPoint(!0),t=l.getTerminalPoint(!1);l.setTerminalPoint(m,!1);l.setTerminalPoint(t,!0);c.setGeometry(g,l);var q=this.view.getState(g),v=this.view.getState(h),y=this.view.getState(f);if(null!=q){var J=null!=v?this.getConnectionConstraint(q,v,!0):null,k=
+null!=y?this.getConnectionConstraint(q,y,!1):null;this.setConnectionConstraint(g,h,!0,k);this.setConnectionConstraint(g,f,!1,J)}b.push(g)}}else if(c.isVertex(g)&&(l=this.getCellGeometry(g),null!=l)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var w=l.width;l.width=l.height;l.height=w;c.setGeometry(g,l);var A=this.view.getState(g);if(null!=A){var r=A.style[mxConstants.STYLE_DIRECTION]||"east";"east"==r?r="south":"south"==r?r="west":"west"==r?r="north":"north"==r&&(r="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,
r,[g])}b.push(g)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b=
0;b<c.length;b++){var d=this.view.getState(c[b]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)?this.removeStateForCell(c[b]):this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};
-Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),g=0;g<a.length;g++)if(this.isHtmlLabel(a[g])){var f=this.convertValueToString(a[g]);if(null!=f&&0<f.length){d.innerHTML=f;for(var h=d.getElementsByTagName(null!=b?b:"*"),l=0;l<h.length;l++)c(h[l]);d.innerHTML!=f&&this.cellLabelChanged(a[g],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=this.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&
-"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),g=a;null!=g;){if(g==this.model.getRoot()||null!=g.value&&"object"==typeof g.value&&g.hasAttribute(d)){this.setAttributeForCell(g,d,c);break}g=this.model.getParent(g)}var f=a.value.cloneNode(!0);f.setAttribute("label",c);c=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=
-new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var g=this.model.getParent(a[b]);null==g||c.get(g)||(c.put(g,!0),d.push(g))}for(b=0;b<d.length;b++)if(g=this.view.getState(d[b]),null!=g&&(this.model.isEdge(g.cell)||this.model.isVertex(g.cell))&&this.isCellDeletable(g.cell)){var f=mxUtils.getValue(g.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),h=mxUtils.getValue(g.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(f==mxConstants.NONE&&h==mxConstants.NONE){f=
-!0;for(h=0;h<this.model.getChildCount(g.cell)&&f;h++)c.get(this.model.getChildAt(g.cell,h))||(f=!1);f&&a.push(g.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var d=this.view.getState(a[b]);if(null!=d){var g=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);g==mxConstants.NONE&&
+Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),g=0;g<a.length;g++)if(this.isHtmlLabel(a[g])){var h=this.convertValueToString(a[g]);if(null!=h&&0<h.length){d.innerHTML=h;for(var f=d.getElementsByTagName(null!=b?b:"*"),l=0;l<f.length;l++)c(f[l]);d.innerHTML!=h&&this.cellLabelChanged(a[g],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=this.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&
+"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),g=a;null!=g;){if(g==this.model.getRoot()||null!=g.value&&"object"==typeof g.value&&g.hasAttribute(d)){this.setAttributeForCell(g,d,c);break}g=this.model.getParent(g)}var h=a.value.cloneNode(!0);h.setAttribute("label",c);c=h}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=
+new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var g=this.model.getParent(a[b]);null==g||c.get(g)||(c.put(g,!0),d.push(g))}for(b=0;b<d.length;b++)if(g=this.view.getState(d[b]),null!=g&&(this.model.isEdge(g.cell)||this.model.isVertex(g.cell))&&this.isCellDeletable(g.cell)){var h=mxUtils.getValue(g.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(g.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(h==mxConstants.NONE&&f==mxConstants.NONE){h=
+!0;for(f=0;f<this.model.getChildCount(g.cell)&&h;f++)c.get(this.model.getChildAt(g.cell,f))||(h=!1);h&&a.push(g.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var d=this.view.getState(a[b]);if(null!=d){var g=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);g==mxConstants.NONE&&
d==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell=function(a,c,b){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=b&&
0<b.length?d.setAttribute(c,b):d.removeAttribute(c);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,c,b,d){this.getModel();if(mxEvent.isAltDown(c))return null;for(var g=0;g<a.length;g++)if(this.model.isEdge(this.model.getParent(a[g])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,
c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var d=this.model.isEdge(c)?this.view.getState(c):null,g=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=g||null!=d&&null!=d.text&&null!=d.text.node&&(mxUtils.contains(d.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||
!(null!=d||mxClient.IS_VML&&g==this.view.getCanvas()||mxClient.IS_SVG&&g==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,d))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),g=this.getPageSize(),c=Math.max(c,d.x*g.width),b=Math.max(b,d.y*g.height);
return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),d=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var d=new mxCell;d.value="Text";
-d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var g=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*g.x)/1E4;d.geometry.y=Math.round(g.y);d.geometry.offset=new mxPoint(0,0);var g=this.view.getPoint(b,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-g.x)/f),Math.round((c-g.y)/f))}else d.style+=
+d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var g=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*g.x)/1E4;d.geometry.y=Math.round(g.y);d.geometry.offset=new mxPoint(0,0);var g=this.view.getPoint(b,d.geometry),h=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-g.x)/h),Math.round((c-g.y)/h))}else d.style+=
"autosize=1;align=left;verticalAlign=top;spacingTop=-4;",g=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-g.x,d.geometry.y=Math.round(c/this.view.scale)-g.y;this.getModel().beginUpdate();try{this.addCells([d],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?
this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.addClickHandler=function(a,c,b){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var d=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=d&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",d),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,d);d();var g=this.container.style.cursor,
-f=this.getTolerance(),h=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(h,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==h.getLinkForCell(c.cell))a=h.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==h.getLinkForCell(a.cell)}),c=h.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=
-this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=h.container.scrollLeft;this.scrollTop=h.container.scrollTop;null==this.currentLink&&"auto"==h.container.style.overflow&&(h.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(h.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>f||d>f)&&this.clear()}}else{for(b=
-c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=h.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&h.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!h.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,d){for(var g=d.getSource(),l=d.getEvent();null!=g&&"a"!=g.nodeName.toLowerCase();)g=g.parentNode;null==
-g&&Math.abs(this.scrollLeft-h.container.scrollLeft)<f&&Math.abs(this.scrollTop-h.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(g=h.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&g||null==c||c(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":g?h.linkTarget:"_top",
-h.openLink(this.currentLink,l),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-h.container.scrollLeft)<f&&Math.abs(this.scrollTop-h.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=h.getAbsoluteUrl(h.getLinkForCell(a.cell));null!=this.currentLink&&(h.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=h.container&&
-(h.container.style.cursor=g);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=h.tooltipHandler&&h.tooltipHandler.hide()}};h.click=function(a){};h.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,g=[];b.beginUpdate();try{for(var h=this.cloneCells(a,!1,null,
-!0),f=0;f<a.length;f++){var l=b.getParent(a[f]),m=this.moveCells([h[f]],d,d,!1)[0];g.push(m);if(c)b.add(l,h[f]);else{var p=l.getIndex(a[f]);b.add(l,h[f],p+1)}}}finally{b.endUpdate()}return g};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),g=[],h=0;h<d.length;h++)g.push(d[h]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==g.length+1)for(h=a.length-1;0<=h;h--)if(0==h||
-a[h]!=g[h-1]){a[h].setAttribute("width",c);a[h].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],d=0;d<c.length;d++)b.push(c[d]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(d=c.length-1;0<=d;d--)if(c[d]!=b[d-1]){for(c=c[d].getElementsByTagName("a");0<
+h=this.getTolerance(),f=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(f,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==f.getLinkForCell(c.cell))a=f.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==f.getLinkForCell(a.cell)}),c=f.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=
+this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=f.container.scrollLeft;this.scrollTop=f.container.scrollTop;null==this.currentLink&&"auto"==f.container.style.overflow&&(f.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(f.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>h||d>h)&&this.clear()}}else{for(b=
+c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=f.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&f.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!f.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,d){for(var g=d.getSource(),l=d.getEvent();null!=g&&"a"!=g.nodeName.toLowerCase();)g=g.parentNode;null==
+g&&Math.abs(this.scrollLeft-f.container.scrollLeft)<h&&Math.abs(this.scrollTop-f.container.scrollTop)<h&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(g=f.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&g||null==c||c(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":g?f.linkTarget:"_top",
+f.openLink(this.currentLink,l),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-f.container.scrollLeft)<h&&Math.abs(this.scrollTop-f.container.scrollTop)<h&&Math.abs(this.startX-d.getGraphX())<h&&Math.abs(this.startY-d.getGraphY())<h&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=f.getAbsoluteUrl(f.getLinkForCell(a.cell));null!=this.currentLink&&(f.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=f.container&&
+(f.container.style.cursor=g);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=f.tooltipHandler&&f.tooltipHandler.hide()}};f.click=function(a){};f.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,g=[];b.beginUpdate();try{for(var f=this.cloneCells(a,!1,null,
+!0),h=0;h<a.length;h++){var l=b.getParent(a[h]),m=this.moveCells([f[h]],d,d,!1)[0];g.push(m);if(c)b.add(l,f[h]);else{var t=l.getIndex(a[h]);b.add(l,f[h],t+1)}}}finally{b.endUpdate()}return g};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),g=[],f=0;f<d.length;f++)g.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==g.length+1)for(f=a.length-1;0<=f;f--)if(0==f||
+a[f]!=g[f-1]){a[f].setAttribute("width",c);a[f].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],d=0;d<c.length;d++)b.push(c[d]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(d=c.length-1;0<=d;d--)if(c[d]!=b[d-1]){for(c=c[d].getElementsByTagName("a");0<
c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,
-c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],d=null,g=null,h=0;h<c.length;h++)if(this.getModel().isVertex(c[h])){var f=this.view.getState(c[h]);if(null!=f){var l=a?f.getCenterX():f.getCenterY(),d=null!=d?Math.max(d,l):l,g=null!=g?Math.min(g,l):l;b.push(f)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});f=this.view.translate;l=this.view.scale;g=g/l-(a?f.x:f.y);d=d/l-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var m=(d-g)/(b.length-1),d=g,h=1;h<
-b.length-1;h++){var p=this.view.getState(this.model.getParent(b[h].cell)),t=this.getCellGeometry(b[h].cell),d=d+m;null!=t&&null!=p&&(t=t.clone(),a?t.x=Math.round(d-t.width/2)-p.origin.x:t.y=Math.round(d-t.height/2)-p.origin.y,this.getModel().setGeometry(b[h].cell,t))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=
-new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<c.length;d++){var g=this.view.getState(a[d]);if(null!=g){var h=this.getCellGeometry(c[d]);null==h||!h.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(h.relative=!1,h.x=g.x/g.view.scale-g.view.translate.x,h.y=g.y/g.view.scale-g.view.translate.y)}}b=new mxCodec;g=new mxGraphModel;h=g.getChildAt(g.getRoot(),0);for(d=0;d<a.length;d++)g.add(h,c[d]);return b.encode(g)};Graph.prototype.createSvgImageExport=function(){var a=
-new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,d,g,h,f,l,m,p){var t=this.useCssTransforms;t&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;g=null!=g?g:!0;h=null!=h?h:!0;f=null!=f?f:!0;var v=h||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==v)throw Error(mxResources.get("drawingEmpty"));var y=this.view.scale,
-k=mxUtils.createXmlDocument(),w=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=w.style?w.style.backgroundColor=a:w.setAttribute("style","background-color:"+a));null==k.createElementNS?(w.setAttribute("xmlns",mxConstants.NS_SVG),w.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):w.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/y;var A=Math.max(1,Math.ceil(v.width*a)+2*b)+(p?5:0),r=Math.max(1,Math.ceil(v.height*
-a)+2*b)+(p?5:0);w.setAttribute("version","1.1");w.setAttribute("width",A+"px");w.setAttribute("height",r+"px");w.setAttribute("viewBox",(g?"-0.5 -0.5":"0 0")+" "+A+" "+r);k.appendChild(w);var x=this.createSvgCanvas(w);x.foOffset=g?-.5:0;x.textOffset=g?-.5:0;x.imageOffset=g?-.5:0;x.translate(Math.floor((b/c-v.x)/y),Math.floor((b/c-v.y)/y));var n=document.createElement("textarea"),z=x.createAlternateContent;x.createAlternateContent=function(a,c,b,d,g,h,f,l,m,p,t,v,y){var w=this.state;if(null!=this.foAltText&&
-(0==d||0!=w.fontSize&&h.length<5*d/w.fontSize)){var k=this.createElement("text");k.setAttribute("x",Math.round(d/2));k.setAttribute("y",Math.round((g+w.fontSize)/2));k.setAttribute("fill",w.fontColor||"black");k.setAttribute("text-anchor","middle");k.setAttribute("font-size",Math.round(w.fontSize)+"px");k.setAttribute("font-family",w.fontFamily);(w.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&k.setAttribute("font-weight","bold");(w.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
-k.setAttribute("font-style","italic");(w.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.setAttribute("text-decoration","underline");try{return n.innerHTML=h,k.textContent=n.value,k}catch(ua){return z.apply(this,arguments)}}else return z.apply(this,arguments)};var I=this.backgroundImage;if(null!=I){c=y/c;var q=this.view.translate,F=new mxRectangle(q.x*c,q.y*c,I.width*c,I.height*c);mxUtils.intersects(v,F)&&x.image(q.x,q.y,I.width,I.height,I.src,!0)}x.scale(a);x.textEnabled=f;l=
-null!=l?l:this.createSvgImageExport();var D=l.drawCellState;l.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),g=b.model.getParent(a.cell);!h&&!d&&null!=g;)d=b.isCellSelected(g),g=b.model.getParent(g);(h||d)&&D.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),x);this.updateSvgLinks(w,m,!0);return w}finally{t&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");
+c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],d=null,g=null,f=0;f<c.length;f++)if(this.getModel().isVertex(c[f])){var h=this.view.getState(c[f]);if(null!=h){var l=a?h.getCenterX():h.getCenterY(),d=null!=d?Math.max(d,l):l,g=null!=g?Math.min(g,l):l;b.push(h)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});h=this.view.translate;l=this.view.scale;g=g/l-(a?h.x:h.y);d=d/l-(a?h.x:h.y);this.getModel().beginUpdate();try{for(var m=(d-g)/(b.length-1),d=g,f=1;f<
+b.length-1;f++){var t=this.view.getState(this.model.getParent(b[f].cell)),q=this.getCellGeometry(b[f].cell),d=d+m;null!=q&&null!=t&&(q=q.clone(),a?q.x=Math.round(d-q.width/2)-t.origin.x:q.y=Math.round(d-q.height/2)-t.origin.y,this.getModel().setGeometry(b[f].cell,q))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=
+new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<c.length;d++){var g=this.view.getState(a[d]);if(null!=g){var f=this.getCellGeometry(c[d]);null==f||!f.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=g.x/g.view.scale-g.view.translate.x,f.y=g.y/g.view.scale-g.view.translate.y)}}b=new mxCodec;g=new mxGraphModel;f=g.getChildAt(g.getRoot(),0);for(d=0;d<a.length;d++)g.add(f,c[d]);return b.encode(g)};Graph.prototype.createSvgImageExport=function(){var a=
+new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,d,g,f,h,l,m,t){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;g=null!=g?g:!0;f=null!=f?f:!0;h=null!=h?h:!0;var v=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==v)throw Error(mxResources.get("drawingEmpty"));var y=this.view.scale,
+k=mxUtils.createXmlDocument(),w=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=w.style?w.style.backgroundColor=a:w.setAttribute("style","background-color:"+a));null==k.createElementNS?(w.setAttribute("xmlns",mxConstants.NS_SVG),w.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):w.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/y;var A=Math.max(1,Math.ceil(v.width*a)+2*b)+(t?5:0),r=Math.max(1,Math.ceil(v.height*
+a)+2*b)+(t?5:0);w.setAttribute("version","1.1");w.setAttribute("width",A+"px");w.setAttribute("height",r+"px");w.setAttribute("viewBox",(g?"-0.5 -0.5":"0 0")+" "+A+" "+r);k.appendChild(w);var x=this.createSvgCanvas(w);x.foOffset=g?-.5:0;x.textOffset=g?-.5:0;x.imageOffset=g?-.5:0;x.translate(Math.floor((b/c-v.x)/y),Math.floor((b/c-v.y)/y));var n=document.createElement("textarea"),z=x.createAlternateContent;x.createAlternateContent=function(a,c,b,d,g,f,h,l,m,t,q,v,y){var w=this.state;if(null!=this.foAltText&&
+(0==d||0!=w.fontSize&&f.length<5*d/w.fontSize)){var k=this.createElement("text");k.setAttribute("x",Math.round(d/2));k.setAttribute("y",Math.round((g+w.fontSize)/2));k.setAttribute("fill",w.fontColor||"black");k.setAttribute("text-anchor","middle");k.setAttribute("font-size",Math.round(w.fontSize)+"px");k.setAttribute("font-family",w.fontFamily);(w.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&k.setAttribute("font-weight","bold");(w.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
+k.setAttribute("font-style","italic");(w.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.setAttribute("text-decoration","underline");try{return n.innerHTML=f,k.textContent=n.value,k}catch(ua){return z.apply(this,arguments)}}else return z.apply(this,arguments)};var J=this.backgroundImage;if(null!=J){c=y/c;var p=this.view.translate,G=new mxRectangle(p.x*c,p.y*c,J.width*c,J.height*c);mxUtils.intersects(v,G)&&x.image(p.x,p.y,J.width,J.height,J.src,!0)}x.scale(a);x.textEnabled=h;l=
+null!=l?l:this.createSvgImageExport();var E=l.drawCellState;l.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),g=b.model.getParent(a.cell);!f&&!d&&null!=g;)d=b.isCellSelected(g),g=b.model.getParent(g);(f||d)&&E.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),x);this.updateSvgLinks(w,m,!0);return w}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");
for(var d=0;d<a.length;d++){var g=a[d].getAttribute("href");null==g&&(g=a[d].getAttribute("xlink:href"));null!=g&&(null!=c&&/^https?:\/\//.test(g)?a[d].setAttribute("target",c):b&&this.isCustomLink(g)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&
(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",
-a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=b.rows[0].cells,g=0,h=0;h<d.length;h++)var f=d[h].getAttribute("colspan"),g=g+(null!=f?parseInt(f):1);b=b.insertRow(c);for(h=0;h<g;h++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var g=document.createElement("th");b.rows[d].appendChild(g);mxUtils.br(g)}b=
+a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=b.rows[0].cells,g=0,f=0;f<d.length;f++)var h=d[f].getAttribute("colspan"),g=g+(null!=h?parseInt(h):1);b=b.insertRow(c);for(f=0;f<g;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var g=document.createElement("th");b.rows[d].appendChild(g);mxUtils.br(g)}b=
a.tBodies[0];for(d=0;d<b.rows.length;d++)g=b.rows[d].insertCell(c),mxUtils.br(g);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,d=0;d<b.length;d++)b[d].cells.length>c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();
for(var d;d=b.firstChild;)lastNode=a.appendChild(d);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel",this.linkRelation);d.setAttribute("href",
this.getAbsoluteUrl(a));d.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&d.setAttribute("target",this.linkTarget);mxUtils.write(d,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return d};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,
function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor=
-"default");return c};var c=!1,b=!1,d=!1,g=this.fireMouseEvent;this.fireMouseEvent=function(a,h,f){a==mxEvent.MOUSE_DOWN&&(h=this.updateMouseEvent(h),c=this.isCellSelected(h.getCell()),b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());g.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,g){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==g.getState()||!g.isSource(g.getState().control))&&(this.popupMenuHandler.popupTrigger||
+"default");return c};var c=!1,b=!1,d=!1,g=this.fireMouseEvent;this.fireMouseEvent=function(a,f,h){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),c=this.isCellSelected(f.getCell()),b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());g.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,g){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==g.getState()||!g.isSource(g.getState().control))&&(this.popupMenuHandler.popupTrigger||
!d&&!mxEvent.isMouseEvent(g.getEvent())&&(b&&null==g.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(g.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,d=a.rangeCount;b<
-d;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(X){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&
-(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var n=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?n.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var q=mxCellEditor.prototype.startEditing;
-mxCellEditor.prototype.startEditing=function(a,c){q.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border=
+d;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(Y){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&
+(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var n=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?n.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;
+mxCellEditor.prototype.startEditing=function(a,c){p.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border=
"gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var r=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var d=b.firstChild;null!=a&&null!=d;)c(a,d),a=a.nextSibling,d=d.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=
a)d(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var g=a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=g}}function d(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;d(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),
a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}r.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),
c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){l=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<l.length&&"\n"==l.charAt(l.length-1)&&(l=l.substring(0,l.length-1));l=this.graph.sanitizeHtml(c?l.replace(/\n/g,"<br/>"):l,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),
-g=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),h=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.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.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=h?"bold":"normal";this.textarea.style.fontStyle=f?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=g;this.textarea.style.padding="0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));
+g=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,h=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.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.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=h?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=g;this.textarea.style.padding="0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));
this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var l=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(l=mxUtils.replaceTrailingNewlines(l,"<div><br></div>"));l=this.graph.sanitizeHtml(c?l.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):l,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=
mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var u=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,
@@ -2400,15 +2400,15 @@ mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxCon
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,
"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",u.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};
mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var c=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
-this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(I){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,
+this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(J){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=
function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var h=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,g,f){mxEvent.isAltDown(f)&&(g=null);h.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/
d-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/d-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};
var l=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=l.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),
this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px",null!=this.linkHint&&
-(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,g=this.graph.view.scale,h=this.roundLength(b.x/g-d.x),d=this.roundLength(b.y/g-d.y);this.hint.innerHTML=h+", "+d;this.hint.style.visibility=
-"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(h=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*h.x)+"%, "+Math.round(100*h.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&
+(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,g=this.graph.view.scale,f=this.roundLength(b.x/g-d.x),d=this.roundLength(b.y/g-d.y);this.hint.innerHTML=f+", "+d;this.hint.style.visibility=
+"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(f=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*f.x)+"%, "+Math.round(100*f.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&
(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+
"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):
new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA6ZJREFUeNqM001IY1cUB/D/fYmm2sbR2lC1zYlgoRG6MpEyBlpxM9iFIGKFIm3s0lCKjOByhCLZCFqLBF1YFVJdSRbdFHRhBbULtRuFVBTzYRpJgo2mY5OX5N9Fo2TG+eiFA/dd3vvd8+65ByTxshARTdf1JySp6/oTEdFe9T5eg5lIcnBwkCSZyWS+exX40oyur68/KxaLf5Okw+H4X+A9JBaLfUySZ2dnnJqaosPhIAACeC34DJRKpb7IZrMcHx+nwWCgUopGo/EOKwf9fn/1CzERUevr6+9ls1mOjIwQAH0+H4PBIKPR6D2ofAQCgToRUeVYJUkuLy8TANfW1kiS8/PzCy84Mw4MDBAAZ2dnmc/nub+/X0MSEBF1cHDwMJVKsaGhgV6vl+l0mqOjo1+KyKfl1dze3l4NBoM/PZ+diFSLiIKIGBOJxA9bW1sEwNXVVSaTyQMRaRaRxrOzs+9J8ujoaE5EPhQRq67rcZ/PRwD0+/3Udf03EdEgIqZisZibnJykwWDg4eEhd3Z2xkXELCJvPpdBrYjUiEhL+Xo4HH4sIhUaAKNSqiIcDsNkMqG+vh6RSOQQQM7tdhsAQCkFAHC73UUATxcWFqypVApmsxnDw8OwWq2TADQNgAYAFosF+XweyWQSdru9BUBxcXFRB/4rEgDcPouIIx6P4+bmBi0tLSCpAzBqAIqnp6c/dnZ2IpfLYXNzE62traMADACKNputpr+/v8lms9UAKAAwiMjXe3t7KBQKqKurQy6Xi6K0i2l6evpROp1mbW0t29vbGY/Hb8/IVIqq2zlJXl1dsaOjg2azmefn5wwEAl+JSBVExCgi75PkzMwMlVJsbGxkIpFgPp8PX15ePopEIs3JZPITXdf/iEajbGpqolKKExMT1HWdHo/nIxGpgIgoEXnQ3d39kCTHxsYIgC6Xi3NzcwyHw8xkMozFYlxaWmJbWxuVUuzt7WUul6PX6/1cRN4WEe2uA0SkaWVl5XGpRVhdXU0A1DSNlZWVdz3qdDrZ09PDWCzG4+Pjn0XEWvp9KJKw2WwKwBsA3gHQHAqFfr24uMDGxgZ2d3cRiUQAAHa7HU6nE319fTg5Ofmlq6vrGwB/AngaCoWK6rbsNptNA1AJoA7Aux6Pp3NoaMhjsVg+QNmIRqO/u1yubwFEASRKUAEA7rASqABUAKgC8KAUb5XWCOAfAFcA/gJwDSB7C93DylCtdM8qABhLc5TumV6KQigUeubjfwcAHkQJ94ndWeYAAAAASUVORK5CYII=":
@@ -2418,50 +2418,50 @@ HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.protot
HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=
!0;mxVertexHandler.prototype.rotationHandleVSpacing=-20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var p=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){p.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
+function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var t=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){t.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,
-d=null,g=null,h=null,f=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,g=this.first.y,h=(this.currentX-d)/this.graph.view.scale,f=(this.currentY-g)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(h=this.graph.snap(h),f=this.graph.snap(f),this.graph.isGridEnabled()||(Math.abs(h)<this.graph.tolerance&&(h=0),Math.abs(f)<this.graph.tolerance&&(f=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var h=new mxRectangle(this.x,
-this.y,this.width,this.height),l=this.graph.getCells(h.x,h.y,h.width,h.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(d,g,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var m=this.graph.view.getState(l[b]),p=this.graph.getCellGeometry(l[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(h,f),this.graph.model.setGeometry(l[b],p))}}finally{this.graph.model.endUpdate()}}else h=
-new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(h,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;var d=c.getX()+b.x,b=c.getY()+b.y,g=this.first.x-d,h=this.first.y-b,f=this.graph.tolerance;if(null!=this.div||Math.abs(g)>f||Math.abs(h)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
+d=null,g=null,f=null,h=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,g=this.first.y,f=(this.currentX-d)/this.graph.view.scale,h=(this.currentY-g)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(f=this.graph.snap(f),h=this.graph.snap(h),this.graph.isGridEnabled()||(Math.abs(f)<this.graph.tolerance&&(f=0),Math.abs(h)<this.graph.tolerance&&(h=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var f=new mxRectangle(this.x,
+this.y,this.width,this.height),l=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(d,g,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var m=this.graph.view.getState(l[b]),t=this.graph.getCellGeometry(l[b]);null!=m&&null!=t&&(t=t.clone(),t.translate(f,h),this.graph.model.setGeometry(l[b],t))}}finally{this.graph.model.endUpdate()}}else f=
+new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;var d=c.getX()+b.x,b=c.getY()+b.y,g=this.first.x-d,f=this.first.y-b,h=this.graph.tolerance;if(null!=this.div||Math.abs(g)>h||Math.abs(f)>h)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
this.update(d,b),this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,g=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/g)*g,this.height=this.graph.snap(this.height/g)*g,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
"white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+
"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var m=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);m.apply(this,arguments)};var t=(new Date).getTime(),x=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){w.apply(this,arguments);b!=this.currentTerminalState?(t=(new Date).getTime(),x=0):x=(new Date).getTime()-t;this.currentTerminalState=b};var D=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&D.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),g=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
+this.secondDiv=null);m.apply(this,arguments)};var q=(new Date).getTime(),x=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){w.apply(this,arguments);b!=this.currentTerminalState?(q=(new Date).getTime(),x=0):x=(new Date).getTime()-q;this.currentTerminalState=b};var E=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&E.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),g=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
d,b):null,b=null!=(null!=g?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),g):null)?this.fixedHandleImage:null!=g&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;
mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var v=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),
null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return v.apply(this,arguments)};var A=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,
-new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):A.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),g=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==g||!g.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
-function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var P=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){P.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var E=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var H=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
+new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):A.apply(this,arguments)};var G=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),g=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==g||!g.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&G.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var Q=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){Q.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var F=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){F.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(b,
d);if(null!=b||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));
this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,
function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var g=document.createElement("div");g.style.marginTop=null!=c||0<d?"6px":"0px";g.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));this.linkHint.appendChild(g)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var L=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){L.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
+null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var g=document.createElement("div");g.style.marginTop=null!=c||0<d?"6px":"0px";g.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));this.linkHint.appendChild(g)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var M=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){M.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(c,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);
this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var z=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){z.apply(this,
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var J=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
-function(){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){N.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
-null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var R=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(R.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
-a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var V=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){V.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&
-(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function n(){mxActor.call(this)}function q(){mxCylinder.call(this)}function r(){mxActor.call(this)}function u(){mxActor.call(this)}function c(){mxActor.call(this)}function g(){mxActor.call(this)}function h(){mxActor.call(this)}function l(){mxActor.call(this)}function p(){mxActor.call(this)}function m(a,c){this.canvas=
+"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
+function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
+null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var T=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(T.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
+a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var W=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var V=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){V.apply(this,arguments);null!=this.linkHint&&
+(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function n(){mxActor.call(this)}function p(){mxCylinder.call(this)}function r(){mxActor.call(this)}function u(){mxActor.call(this)}function c(){mxActor.call(this)}function g(){mxActor.call(this)}function h(){mxActor.call(this)}function l(){mxActor.call(this)}function t(){mxActor.call(this)}function m(a,c){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function D(){mxActor.call(this)}function y(){mxActor.call(this)}function v(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function P(){mxShape.call(this)}function E(){mxShape.call(this)}
-function H(){mxEllipse.call(this)}function L(){mxShape.call(this)}function z(){mxShape.call(this)}function B(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function N(){mxShape.call(this)}function R(){mxShape.call(this)}function V(){mxShape.call(this)}function U(){mxShape.call(this)}function I(){mxCylinder.call(this)}function ha(){mxDoubleEllipse.call(this)}function na(){mxDoubleEllipse.call(this)}function X(){mxArrowConnector.call(this);this.spacing=0}function aa(){mxArrowConnector.call(this);
-this.spacing=0}function M(){mxActor.call(this)}function G(){mxRectangleShape.call(this)}function T(){mxActor.call(this)}function K(){mxActor.call(this)}function O(){mxActor.call(this)}function S(){mxActor.call(this)}function ja(){mxActor.call(this)}function C(){mxActor.call(this)}function da(){mxActor.call(this)}function W(){mxActor.call(this)}function Y(){mxActor.call(this)}function ba(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
-function sa(){mxRhombus.call(this)}function la(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function ia(){mxActor.call(this)}function fa(){mxActor.call(this)}function ca(){mxConnector.call(this)}function ya(a,c,b,d,g,h,f,l,m,p){f+=m;var ga=d.clone();d.x-=g*(2*f+m);d.y-=h*(2*f+m);g*=f+m;h*=f+m;return function(){a.ellipse(ga.x-g-f,ga.y-h-f,2*f,2*f);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
-mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,d,g){var h=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ga=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(d-h,0);a.lineTo(d,
-h);a.lineTo(d,g);a.lineTo(h,g);a.lineTo(0,g-h);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-h,0),a.lineTo(d,h),a.lineTo(h,h),a.close(),a.fill()),0!=ga&&(a.setFillAlpha(Math.abs(ga)),a.setFillColor(0>ga?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(h,h),a.lineTo(h,g),a.lineTo(0,g-h),a.close(),a.fill()),a.begin(),a.moveTo(h,g),a.lineTo(h,h),a.lineTo(0,
-0),a.moveTo(h,h),a.lineTo(d,h),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var wa=Math.tan(mxUtils.toRadians(30)),ra=(.5-wa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/wa);a.translate((d-c)/2,(g-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*
-c,c*ra);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ra)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,c,b,d,g,h){c=Math.min(d,g/(.5+wa));h?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-ra)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-ra)*c),a.lineTo(.5*c,(1-ra)*c)):(a.translate((d-c)/2,(g-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ra),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ra)*c),a.lineTo(0,
-.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,g,h){c=Math.min(g/2,Math.round(g/8)+this.strokewidth-1);if(h&&null!=this.fill||!h&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),h||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),h||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),h||(a.stroke(),a.begin()),a.translate(0,-c);h||(a.moveTo(0,
-c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,g-c),a.curveTo(d,g+c/3,0,g+c/3,0,g-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,c,b,d,g){var h=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),
-f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(d-h,0);a.lineTo(d,h);a.lineTo(d,g);a.lineTo(0,g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-h,0),a.lineTo(d-h,h),a.lineTo(d,h),a.close(),a.fill()),a.begin(),a.moveTo(d-h,0),a.lineTo(d-h,h),a.lineTo(d,h),a.end(),a.stroke())};
-mxCellRenderer.registerShape("note",k);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d/2,.5*g,d,0);a.quadTo(.5*d,g/2,d,g);a.quadTo(d/2,.5*g,0,g);a.quadTo(.5*d,g/2,0,0);a.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.redrawPath=function(a,c,b,d,g,h){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));
-b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var f=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);h?"left"==f?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==f?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,g),a.lineTo(0,g),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",q);mxUtils.extend(r,mxActor);r.prototype.size=
+this.canvas.curveTo=mxUtils.bind(this,m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo)}function q(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function E(){mxActor.call(this)}function y(){mxActor.call(this)}function v(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function Q(){mxShape.call(this)}function F(){mxShape.call(this)}
+function I(){mxEllipse.call(this)}function M(){mxShape.call(this)}function z(){mxShape.call(this)}function B(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function O(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxShape.call(this)}function V(){mxShape.call(this)}function J(){mxCylinder.call(this)}function ha(){mxDoubleEllipse.call(this)}function na(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this);this.spacing=0}function ba(){mxArrowConnector.call(this);
+this.spacing=0}function N(){mxActor.call(this)}function H(){mxRectangleShape.call(this)}function U(){mxActor.call(this)}function L(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function ja(){mxActor.call(this)}function D(){mxActor.call(this)}function ea(){mxActor.call(this)}function X(){mxActor.call(this)}function Z(){mxActor.call(this)}function ca(){mxActor.call(this)}function fa(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
+function sa(){mxRhombus.call(this)}function la(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function ia(){mxActor.call(this)}function ga(){mxActor.call(this)}function da(){mxConnector.call(this)}function ya(a,c,b,d,g,f,h,l,m,t){h+=m;var C=d.clone();d.x-=g*(2*h+m);d.y-=f*(2*h+m);g*=h+m;f*=h+m;return function(){a.ellipse(C.x-g-h,C.y-f-h,2*h,2*h);t?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,d,g){var f=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),h=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),C=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,
+f);a.lineTo(d,g);a.lineTo(f,g);a.lineTo(0,g-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=h&&(a.setFillAlpha(Math.abs(h)),a.setFillColor(0>h?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-f,0),a.lineTo(d,f),a.lineTo(f,f),a.close(),a.fill()),0!=C&&(a.setFillAlpha(Math.abs(C)),a.setFillColor(0>C?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,g),a.lineTo(0,g-f),a.close(),a.fill()),a.begin(),a.moveTo(f,g),a.lineTo(f,f),a.lineTo(0,
+0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var wa=Math.tan(mxUtils.toRadians(30)),ra=(.5-wa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/wa);a.translate((d-c)/2,(g-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*
+c,c*ra);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ra)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,c,b,d,g,f){c=Math.min(d,g/(.5+wa));f?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-ra)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-ra)*c),a.lineTo(.5*c,(1-ra)*c)):(a.translate((d-c)/2,(g-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ra),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ra)*c),a.lineTo(0,
+.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,g,f){c=Math.min(g/2,Math.round(g/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),f||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),f||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),f||(a.stroke(),a.begin()),a.translate(0,-c);f||(a.moveTo(0,
+c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,g-c),a.curveTo(d,g+c/3,0,g+c/3,0,g-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,c,b,d,g){var f=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),
+h=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,g);a.lineTo(0,g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=h&&(a.setFillAlpha(Math.abs(h)),a.setFillColor(0>h?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.end(),a.stroke())};
+mxCellRenderer.registerShape("note",k);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d/2,.5*g,d,0);a.quadTo(.5*d,g/2,d,g);a.quadTo(d/2,.5*g,0,g);a.quadTo(.5*d,g/2,0,0);a.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,d,g,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));
+b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var h=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);f?"left"==h?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==h?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,g),a.lineTo(0,g),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(r,mxActor);r.prototype.size=
30;r.prototype.isRoundable=function(){return!0};r.prototype.redrawPath=function(a,c,b,d,g){c=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,g),new mxPoint(0,g),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",r);mxUtils.extend(u,mxActor);u.prototype.size=.4;u.prototype.redrawPath=
function(a,c,b,d,g){c=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,g-c/2);a.quadTo(3*d/4,g-1.4*c,d/2,g-c/2);a.quadTo(d/4,g-c*(1-1.4),0,g-c/2);a.lineTo(0,c/2);a.close();a.end()};u.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==
mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,d)}return a};mxCellRenderer.registerShape("tape",u);mxUtils.extend(c,mxActor);c.prototype.size=.3;c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};c.prototype.redrawPath=function(a,c,b,d,g){c=g*Math.max(0,
@@ -2469,140 +2469,159 @@ Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(
function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,c,b,d,g){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,g),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,g)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",g);mxUtils.extend(h,mxActor);h.prototype.size=.2;h.prototype.isRoundable=function(){return!0};h.prototype.redrawPath=function(a,c,b,d,g){c=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
g),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,g)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",h);mxUtils.extend(l,mxActor);l.prototype.size=.5;l.prototype.redrawPath=function(a,c,b,d,g){a.setFillColor(null);c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,g/2),new mxPoint(0,g/2),new mxPoint(c,
-g/2),new mxPoint(c,g),new mxPoint(d,g)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",l);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(a,c,b,d,g){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,g);a.fillAndStroke();a.rect(2*c,0,c,g);a.fillAndStroke();a.rect(4*c,0,c,g);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",p);m.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
-c;this.firstX=a;this.firstY=c};m.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};m.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};m.prototype.curveTo=function(a,c,b,d,g,h){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=h};m.prototype.arcTo=function(a,c,b,d,
-g,h,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=h;this.lastY=f};m.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),g=Math.abs(c-this.lastY),h=Math.sqrt(d*d+g*g);if(2>h){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var f=Math.round(h/10),l=this.defaultVariation;5>f&&(f=5,l/=3);for(var ga=b(a-this.lastX)*d/f,b=b(c-this.lastY)*g/
-f,d=d/h,g=g/h,h=0;h<f;h++){var m=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,ga*h+this.lastX-m*g,b*h+this.lastY-m*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};m.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
+g/2),new mxPoint(c,g),new mxPoint(d,g)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",l);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,c,b,d,g){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,g);a.fillAndStroke();a.rect(2*c,0,c,g);a.fillAndStroke();a.rect(4*c,0,c,g);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);m.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
+c;this.firstX=a;this.firstY=c};m.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};m.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};m.prototype.curveTo=function(a,c,b,d,g,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};m.prototype.arcTo=function(a,c,b,d,
+g,f,h){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=h};m.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),g=Math.abs(c-this.lastY),f=Math.sqrt(d*d+g*g);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var h=Math.round(f/10),C=this.defaultVariation;5>h&&(h=5,C/=3);for(var l=b(a-this.lastX)*d/h,b=b(c-this.lastY)*g/h,
+d=d/f,g=g/f,f=0;f<h;f++){var m=(Math.random()-.5)*C;this.originalLineTo.call(this.canvas,l*f+this.lastX-m*g,b*f+this.lastY-m*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};m.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
var Ia=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new m(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ia.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ja=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
-this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ja.apply(this,arguments)};var Ka=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,d,g){if(null==a.handJiggle)Ka.apply(this,arguments);else{var h=!0;null!=this.style&&(h="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(h||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)h||null!=this.fill&&this.fill!=mxConstants.NONE||
-(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?h=Math.min(d/2,Math.min(g/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,h=Math.min(d*h,g*h)),a.moveTo(c+h,b),a.lineTo(c+d-h,b),a.quadTo(c+d,b,c+d,b+h),a.lineTo(c+d,b+g-h),a.quadTo(c+d,b+g,c+d-h,b+g),a.lineTo(c+h,b+g),a.quadTo(c,b+g,c,b+g-h),
-a.lineTo(c,b+h),a.quadTo(c,b,c+h,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+g),a.lineTo(c,b+g),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var La=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,g){null==a.handJiggle&&La.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*g,b*g));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};t.prototype.paintForeground=
-function(a,c,b,d,g){var h=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,h=Math.max(h,Math.min(d*f,g*f));h=Math.round(h);a.begin();a.moveTo(c+h,b);a.lineTo(c+h,b+g);a.moveTo(c+d-h,b);a.lineTo(c+d-h,b+g);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",t);mxUtils.extend(x,
+this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ja.apply(this,arguments)};var Ka=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,d,g){if(null==a.handJiggle)Ka.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||
+(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(g/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,g*f)),a.moveTo(c+f,b),a.lineTo(c+d-f,b),a.quadTo(c+d,b,c+d,b+f),a.lineTo(c+d,b+g-f),a.quadTo(c+d,b+g,c+d-f,b+g),a.lineTo(c+f,b+g),a.quadTo(c,b+g,c,b+g-f),
+a.lineTo(c,b+f),a.quadTo(c,b,c+f,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+g),a.lineTo(c,b+g),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var La=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,g){null==a.handJiggle&&La.apply(this,arguments)};mxUtils.extend(q,mxRectangleShape);q.prototype.size=.1;q.prototype.isHtmlAllowed=function(){return!1};q.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*g,b*g));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};q.prototype.paintForeground=
+function(a,c,b,d,g){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*h,g*h));f=Math.round(f);a.begin();a.moveTo(c+f,b);a.lineTo(c+f,b+g);a.moveTo(c+d-f,b);a.lineTo(c+d-f,b+g);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",q);mxUtils.extend(x,
mxRectangleShape);x.prototype.paintBackground=function(a,c,b,d,g){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,g);a.fill()};x.prototype.paintForeground=function(a,c,b,d,g){};mxCellRenderer.registerShape("transparent",x);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable=
-function(){return!0};w.prototype.redrawPath=function(a,c,b,d,g){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var h=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,g-b),new mxPoint(Math.min(d,h+l),g-b),new mxPoint(f,g),new mxPoint(Math.max(0,h),g-b),new mxPoint(0,g-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(a,c,b,d,g){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(0,g),new mxPoint(c,g/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",D);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
+function(){return!0};w.prototype.redrawPath=function(a,c,b,d,g){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),h=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),C=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
+this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,g-b),new mxPoint(Math.min(d,f+C),g-b),new mxPoint(h,g),new mxPoint(Math.max(0,f),g-b),new mxPoint(0,g-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(E,mxActor);E.prototype.size=.2;E.prototype.fixedSize=20;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath=function(a,c,b,d,g){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(0,g),new mxPoint(c,g/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",E);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
function(a,c,b,d,g){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*g),new mxPoint(d-c,g),new mxPoint(c,g),new mxPoint(0,.5*g)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.paintForeground=function(a,
-c,b,d,g){var h=Math.min(d/5,g/5)+1;a.begin();a.moveTo(c+d/2,b+h);a.lineTo(c+d/2,b+g-h);a.moveTo(c+h,b+g/2);a.lineTo(c+d-h,b+g/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",v);var Ea=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,g){Ea.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var h=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=h;b+=h;d-=2*h;g-=2*h;0<d&&0<g&&(a.setShadow(!1),Ea.apply(this,[a,c,b,d,g]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};A.prototype.paintForeground=function(a,c,b,d,g){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var h=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=h;b+=h;d-=2*h;g-=2*h;0<d&&0<g&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var h=0,f;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+
-h]];if(null!=f){var l=this.style["symbol"+h+"Align"],m=this.style["symbol"+h+"VerticalAlign"],ga=this.style["symbol"+h+"Width"],p=this.style["symbol"+h+"Height"],t=this.style["symbol"+h+"Spacing"]||0,v=this.style["symbol"+h+"VSpacing"]||t,y=this.style["symbol"+h+"ArcSpacing"];null!=y&&(y*=this.getArcSize(d+this.strokewidth,g+this.strokewidth),t+=y,v+=y);var y=c,w=b,y=l==mxConstants.ALIGN_CENTER?y+(d-ga)/2:l==mxConstants.ALIGN_RIGHT?y+(d-ga-t):y+t,w=m==mxConstants.ALIGN_MIDDLE?w+(g-p)/2:m==mxConstants.ALIGN_BOTTOM?
-w+(g-p-v):w+v;a.save();l=new f;l.style=this.style;f.prototype.paintVertexShape.call(l,a,y,w,ga,p);a.restore()}h++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",A);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,c,b,d,g,h){h?(a.moveTo(0,0),a.lineTo(d/2,g/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,g),a.lineTo(0,g),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(P,mxShape);
-P.prototype.paintBackground=function(a,c,b,d,g){a.translate(c,b);a.ellipse(d/4,0,d/2,g/4);a.fillAndStroke();a.begin();a.moveTo(d/2,g/4);a.lineTo(d/2,2*g/3);a.moveTo(d/2,g/3);a.lineTo(0,g/3);a.moveTo(d/2,g/3);a.lineTo(d,g/3);a.moveTo(d/2,2*g/3);a.lineTo(0,g);a.moveTo(d/2,2*g/3);a.lineTo(d,g);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",P);mxUtils.extend(E,mxShape);E.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};E.prototype.paintBackground=function(a,
-c,b,d,g){a.translate(c,b);a.begin();a.moveTo(0,g/4);a.lineTo(0,3*g/4);a.end();a.stroke();a.begin();a.moveTo(0,g/2);a.lineTo(d/6,g/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,g);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",E);mxUtils.extend(H,mxEllipse);H.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+g);a.lineTo(c+7*d/8,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",H);mxUtils.extend(L,
-mxShape);L.prototype.paintVertexShape=function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,g);a.moveTo(0,0);a.lineTo(d,g);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(3*d/8,g/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,g/8,d,7*g/8);a.fillAndStroke()};
+c,b,d,g){var f=Math.min(d/5,g/5)+1;a.begin();a.moveTo(c+d/2,b+f);a.lineTo(c+d/2,b+g-f);a.moveTo(c+f,b+g/2);a.lineTo(c+d-f,b+g/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",v);var Ea=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,g){Ea.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=f;b+=f;d-=2*f;g-=2*f;0<d&&0<g&&(a.setShadow(!1),Ea.apply(this,[a,c,b,d,g]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
+this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};A.prototype.paintForeground=function(a,c,b,d,g){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=f;b+=f;d-=2*f;g-=2*f;0<d&&0<g&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,h;do{h=mxCellRenderer.defaultShapes[this.style["symbol"+
+f]];if(null!=h){var C=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],t=this.style["symbol"+f+"Height"],q=this.style["symbol"+f+"Spacing"]||0,v=this.style["symbol"+f+"VSpacing"]||q,y=this.style["symbol"+f+"ArcSpacing"];null!=y&&(y*=this.getArcSize(d+this.strokewidth,g+this.strokewidth),q+=y,v+=y);var y=c,w=b,y=C==mxConstants.ALIGN_CENTER?y+(d-m)/2:C==mxConstants.ALIGN_RIGHT?y+(d-m-q):y+q,w=l==mxConstants.ALIGN_MIDDLE?w+(g-t)/2:l==mxConstants.ALIGN_BOTTOM?
+w+(g-t-v):w+v;a.save();C=new h;C.style=this.style;h.prototype.paintVertexShape.call(C,a,y,w,m,t);a.restore()}f++}while(null!=h)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",A);mxUtils.extend(G,mxCylinder);G.prototype.redrawPath=function(a,c,b,d,g,f){f?(a.moveTo(0,0),a.lineTo(d/2,g/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,g),a.lineTo(0,g),a.close())};mxCellRenderer.registerShape("message",G);mxUtils.extend(Q,mxShape);
+Q.prototype.paintBackground=function(a,c,b,d,g){a.translate(c,b);a.ellipse(d/4,0,d/2,g/4);a.fillAndStroke();a.begin();a.moveTo(d/2,g/4);a.lineTo(d/2,2*g/3);a.moveTo(d/2,g/3);a.lineTo(0,g/3);a.moveTo(d/2,g/3);a.lineTo(d,g/3);a.moveTo(d/2,2*g/3);a.lineTo(0,g);a.moveTo(d/2,2*g/3);a.lineTo(d,g);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",Q);mxUtils.extend(F,mxShape);F.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};F.prototype.paintBackground=function(a,
+c,b,d,g){a.translate(c,b);a.begin();a.moveTo(0,g/4);a.lineTo(0,3*g/4);a.end();a.stroke();a.begin();a.moveTo(0,g/2);a.lineTo(d/6,g/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,g);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",F);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+g);a.lineTo(c+7*d/8,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",I);mxUtils.extend(M,
+mxShape);M.prototype.paintVertexShape=function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,g);a.moveTo(0,0);a.lineTo(d,g);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",M);mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(3*d/8,g/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,g/8,d,7*g/8);a.fillAndStroke()};
z.prototype.paintForeground=function(a,c,b,d,g){a.begin();a.moveTo(3*d/8,g/8*1.1);a.lineTo(5*d/8,g/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",z);mxUtils.extend(B,mxRectangleShape);B.prototype.size=40;B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};B.prototype.paintBackground=function(a,c,b,d,
-g){var h=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"participant");null==f||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,d,h):(f=this.state.view.graph.cellRenderer.getShape(f),null!=f&&f!=B&&(f=new f,f.apply(this.state),a.save(),f.paintVertexShape(a,c,b,d,h),a.restore()));h<g&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+h),a.lineTo(c+d/2,b+g),a.end(),a.stroke())};B.prototype.paintForeground=function(a,
-c,b,d,g){var h=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(g,h))};mxCellRenderer.registerShape("umlLifeline",B);mxUtils.extend(J,mxShape);J.prototype.width=60;J.prototype.height=30;J.prototype.corner=10;J.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};J.prototype.paintBackground=function(a,c,b,d,g){var h=this.corner,f=Math.min(d,Math.max(h,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(g,Math.max(1.5*h,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(c,b,d,g),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
-mxConstants.NONE?(this.getGradientBounds(a,c,b,d,g),a.setGradient(this.fill,this.gradient,c,b,d,g,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f,b+Math.max(0,l-1.5*h));a.lineTo(c+Math.max(0,f-h),b+l);a.lineTo(c,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(c+f,b);a.lineTo(c+d,b);a.lineTo(c+d,b+g);a.lineTo(c,b+g);a.lineTo(c,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",J);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=B.prototype.size;
+g){var f=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),h=mxUtils.getValue(this.style,"participant");null==h||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,d,f):(h=this.state.view.graph.cellRenderer.getShape(h),null!=h&&h!=B&&(h=new h,h.apply(this.state),a.save(),h.paintVertexShape(a,c,b,d,f),a.restore()));f<g&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+f),a.lineTo(c+d/2,b+g),a.end(),a.stroke())};B.prototype.paintForeground=function(a,
+c,b,d,g){var f=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(g,f))};mxCellRenderer.registerShape("umlLifeline",B);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,c,b,d,g){var f=this.corner,h=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(g,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),C=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);C!=mxConstants.NONE&&(a.setFillColor(C),a.rect(c,b,d,g),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(a,c,b,d,g),a.setGradient(this.fill,this.gradient,c,b,d,g,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+h,b);a.lineTo(c+h,b+Math.max(0,l-1.5*f));a.lineTo(c+Math.max(0,h-f),b+l);a.lineTo(c,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(c+h,b);a.lineTo(c+d,b);a.lineTo(c+d,b+g);a.lineTo(c,b+g);a.lineTo(c,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=B.prototype.size;
null!=c&&(d=mxUtils.getValue(c.style,"size",d)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+d,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
mxPerimeter.BackbonePerimeter=function(a,c,b,d){d=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(d+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),
-a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",w.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var h=g.prototype.size;
-null!=c&&(h=mxUtils.getValue(c.style,"size",h));var f=a.x,l=a.y,m=a.width,p=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(h=p*Math.max(0,Math.min(1,h)),l=[new mxPoint(f,l),new mxPoint(f+m,l+h),new mxPoint(f+m,l+p),new mxPoint(f,l+p-h),new mxPoint(f,l)]):(h=m*Math.max(0,Math.min(1,h)),l=[new mxPoint(f+h,l),new mxPoint(f+m,l),new mxPoint(f+m-h,l+p),new mxPoint(f,
-l+p),new mxPoint(f+h,l)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);d&&(b.x<f||b.x>f+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var g=h.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));var f=a.x,l=a.y,m=a.width,p=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-c==mxConstants.DIRECTION_EAST?(g=m*Math.max(0,Math.min(1,g)),l=[new mxPoint(f+g,l),new mxPoint(f+m-g,l),new mxPoint(f+m,l+p),new mxPoint(f,l+p),new mxPoint(f+g,l)]):c==mxConstants.DIRECTION_WEST?(g=m*Math.max(0,Math.min(1,g)),l=[new mxPoint(f,l),new mxPoint(f+m,l),new mxPoint(f+m-g,l+p),new mxPoint(f+g,l+p),new mxPoint(f,l)]):c==mxConstants.DIRECTION_NORTH?(g=p*Math.max(0,Math.min(1,g)),l=[new mxPoint(f,l+g),new mxPoint(f+m,l),new mxPoint(f+m,l+p),new mxPoint(f,l+p-g),new mxPoint(f,l+g)]):(g=p*Math.max(0,
-Math.min(1,g)),l=[new mxPoint(f,l),new mxPoint(f+m,l+g),new mxPoint(f+m,l+p-g),new mxPoint(f,l+p),new mxPoint(f,l)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);d&&(b.x<f||b.x>f+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var g="0"!=mxUtils.getValue(c.style,"fixedSize","0"),h=g?D.prototype.fixedSize:D.prototype.size;null!=c&&(h=mxUtils.getValue(c.style,
-"size",h));var f=a.x,l=a.y,m=a.width,p=a.height,t=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(g=g?Math.max(0,Math.min(m,h)):m*Math.max(0,Math.min(1,h)),l=[new mxPoint(f,l),new mxPoint(f+m-g,l),new mxPoint(f+m,a),new mxPoint(f+m-g,l+p),new mxPoint(f,l+p),new mxPoint(f+g,a),new mxPoint(f,l)]):c==mxConstants.DIRECTION_WEST?(g=g?Math.max(0,Math.min(m,h)):m*Math.max(0,
-Math.min(1,h)),l=[new mxPoint(f+g,l),new mxPoint(f+m,l),new mxPoint(f+m-g,a),new mxPoint(f+m,l+p),new mxPoint(f+g,l+p),new mxPoint(f,a),new mxPoint(f+g,l)]):c==mxConstants.DIRECTION_NORTH?(g=g?Math.max(0,Math.min(p,h)):p*Math.max(0,Math.min(1,h)),l=[new mxPoint(f,l+g),new mxPoint(t,l),new mxPoint(f+m,l+g),new mxPoint(f+m,l+p),new mxPoint(t,l+p-g),new mxPoint(f,l+p),new mxPoint(f,l+g)]):(g=g?Math.max(0,Math.min(p,h)):p*Math.max(0,Math.min(1,h)),l=[new mxPoint(f,l),new mxPoint(t,l+g),new mxPoint(f+
-m,l),new mxPoint(f+m,l+p-g),new mxPoint(t,l+p),new mxPoint(f,l+p-g),new mxPoint(f,l)]);t=new mxPoint(t,a);d&&(b.x<f||b.x>f+m?t.y=b.y:t.x=b.x);return mxUtils.getPerimeterPoint(l,t,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var g=y.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));var h=a.x,f=a.y,l=a.width,m=a.height,p=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(g=m*Math.max(0,Math.min(1,g)),f=[new mxPoint(p,f),new mxPoint(h+l,f+g),new mxPoint(h+l,f+m-g),new mxPoint(p,f+m),new mxPoint(h,f+m-g),new mxPoint(h,f+g),new mxPoint(p,f)]):(g=l*Math.max(0,Math.min(1,g)),f=[new mxPoint(h+g,f),new mxPoint(h+l-g,f),new mxPoint(h+l,a),new mxPoint(h+l-g,f+m),new mxPoint(h+g,f+m),new mxPoint(h,a),new mxPoint(h+g,f)]);p=new mxPoint(p,a);d&&(b.x<h||b.x>h+
-l?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(f,p,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,c,b,d,g){var h=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-h)/2,0,h,h);a.fillAndStroke();a.begin();a.moveTo(d/2,h);a.lineTo(d/2,g);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",N);mxUtils.extend(R,mxShape);R.prototype.size=
-10;R.prototype.inset=2;R.prototype.paintBackground=function(a,c,b,d,g){var h=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,h+f);a.lineTo(d/2,g);a.end();a.stroke();a.begin();a.moveTo((d-h)/2-f,h/2);a.quadTo((d-h)/2-f,h+f,d/2,h+f);a.quadTo((d+h)/2+f,h+f,(d+h)/2+f,h/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(V,mxShape);V.prototype.paintBackground=
-function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",V);mxUtils.extend(U,mxShape);U.prototype.inset=2;U.prototype.paintBackground=function(a,c,b,d,g){var h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,h,d-2*h,g-2*h);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d/2,g);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
-U);mxUtils.extend(I,mxCylinder);I.prototype.jettyWidth=32;I.prototype.jettyHeight=12;I.prototype.redrawPath=function(a,c,b,d,g,h){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=f/2;var f=b+f/2,l=.3*g-c/2,m=.7*g-c/2;h?(a.moveTo(b,l),a.lineTo(f,l),a.lineTo(f,l+c),a.lineTo(b,l+c),a.moveTo(b,m),a.lineTo(f,m),a.lineTo(f,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,g),a.lineTo(b,g),
-a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",I);mxUtils.extend(ha,mxDoubleEllipse);ha.prototype.outerStroke=!0;ha.prototype.paintVertexShape=function(a,c,b,d,g){var h=Math.min(4,Math.min(d/5,g/5));0<d&&0<g&&(a.ellipse(c+h,b+h,d-2*h,g-2*h),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,g),a.stroke())};mxCellRenderer.registerShape("endState",
-ha);mxUtils.extend(na,ha);na.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",na);mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=4;X.prototype.isOpenEnded=function(){return!0};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};X.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",X);mxUtils.extend(aa,mxArrowConnector);aa.prototype.defaultWidth=10;
-aa.prototype.defaultArrowWidth=20;aa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};aa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",aa);mxUtils.extend(M,mxActor);
-M.prototype.size=30;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,g),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,g)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",M);mxUtils.extend(G,mxRectangleShape);G.prototype.dx=20;G.prototype.dy=20;G.prototype.isHtmlAllowed=
-function(){return!1};G.prototype.paintForeground=function(a,c,b,d,g){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var h=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,h=Math.max(h,Math.min(d*f,g*f));f=Math.max(h,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));h=Math.max(h,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+h);a.lineTo(c+d,b+h);
-a.end();a.stroke();a.begin();a.moveTo(c+f,b);a.lineTo(c+f,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",G);mxUtils.extend(T,mxActor);T.prototype.dx=20;T.prototype.dy=20;T.prototype.redrawPath=function(a,c,b,d,g){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,g),new mxPoint(0,g)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("corner",T);mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.lineTo(0,g);a.end();a.moveTo(d,0);a.lineTo(d,g);a.end();a.moveTo(0,g/2);a.lineTo(d,g/2);a.end()};mxCellRenderer.registerShape("crossbar",K);mxUtils.extend(O,mxActor);O.prototype.dx=20;O.prototype.dy=
-20;O.prototype.redrawPath=function(a,c,b,d,g){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,g),new mxPoint((d-c)/2,g),new mxPoint((d-
-c)/2,b),new mxPoint(0,b)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("tee",O);mxUtils.extend(S,mxActor);S.prototype.arrowWidth=.3;S.prototype.arrowSize=.2;S.prototype.redrawPath=function(a,c,b,d,g){var h=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(g-h)/2;var h=b+h,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(d-c,h),new mxPoint(0,h)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",S);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,b,d,g){var h=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize))));
-b=(g-h)/2;var h=b+h,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,g/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(d-c,h),new mxPoint(c,h),new mxPoint(c,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ja);mxUtils.extend(C,mxActor);C.prototype.size=.1;C.prototype.redrawPath=function(a,c,b,d,g){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,g/2,d,g);a.lineTo(c,g);a.quadTo(c-2*c,g/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",C);mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.close();a.end()};mxCellRenderer.registerShape("or",da);mxUtils.extend(W,mxActor);W.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.quadTo(d/2,g/2,0,0);a.close();
-a.end()};mxCellRenderer.registerShape("xor",W);mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d/2,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,g),new mxPoint(0,g),new mxPoint(0,.8*c)],this.isRounded,b,!0);
-a.end()};mxCellRenderer.registerShape("loopLimit",Y);mxUtils.extend(ba,mxActor);ba.prototype.size=.375;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(a,c,b,d,g){c=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,g-c),new mxPoint(d/2,g),new mxPoint(0,g-c)],this.isRounded,b,!0);a.end()};
-mxCellRenderer.registerShape("offPageConnector",ba);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/2,b+g);a.lineTo(c+d,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+g/2);a.lineTo(c+d,b+g/2);
-a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Z);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*g);a.lineTo(c+.855*d,b+.855*g);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*g);a.lineTo(c+.145*d,b+.855*g);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);
-mxUtils.extend(sa,mxRhombus);sa.prototype.paintVertexShape=function(a,c,b,d,g){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+g/2);a.lineTo(c+d,b+g/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",sa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,d,g){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+g/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+g);a.lineTo(c+d,b+g);a.lineTo(c+d/2,b+g/2);
-a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",la);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(a,c,b,d,g){var h=b+g-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+g);a.moveTo(c,h);a.lineTo(c+10,h-5);a.moveTo(c,h);a.lineTo(c+10,h+5);a.moveTo(c,h);a.lineTo(c+d,h);a.moveTo(c+d,b);a.lineTo(c+d,b+g);a.moveTo(c+d,h);a.lineTo(c+d-10,h-5);a.moveTo(c+d,h);a.lineTo(c+d-10,h+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",oa);mxUtils.extend(va,mxEllipse);
+a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",w.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var f=g.prototype.size;
+null!=c&&(f=mxUtils.getValue(c.style,"size",f));var h=a.x,l=a.y,m=a.width,C=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=C*Math.max(0,Math.min(1,f)),l=[new mxPoint(h,l),new mxPoint(h+m,l+f),new mxPoint(h+m,l+C),new mxPoint(h,l+C-f),new mxPoint(h,l)]):(f=m*Math.max(0,Math.min(1,f)),l=[new mxPoint(h+f,l),new mxPoint(h+m,l),new mxPoint(h+m-f,l+C),new mxPoint(h,
+l+C),new mxPoint(h+f,l)]);C=a.getCenterX();a=a.getCenterY();a=new mxPoint(C,a);d&&(b.x<h||b.x>h+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var g=h.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));var f=a.x,l=a.y,m=a.width,C=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
+c==mxConstants.DIRECTION_EAST?(g=m*Math.max(0,Math.min(1,g)),l=[new mxPoint(f+g,l),new mxPoint(f+m-g,l),new mxPoint(f+m,l+C),new mxPoint(f,l+C),new mxPoint(f+g,l)]):c==mxConstants.DIRECTION_WEST?(g=m*Math.max(0,Math.min(1,g)),l=[new mxPoint(f,l),new mxPoint(f+m,l),new mxPoint(f+m-g,l+C),new mxPoint(f+g,l+C),new mxPoint(f,l)]):c==mxConstants.DIRECTION_NORTH?(g=C*Math.max(0,Math.min(1,g)),l=[new mxPoint(f,l+g),new mxPoint(f+m,l),new mxPoint(f+m,l+C),new mxPoint(f,l+C-g),new mxPoint(f,l+g)]):(g=C*Math.max(0,
+Math.min(1,g)),l=[new mxPoint(f,l),new mxPoint(f+m,l+g),new mxPoint(f+m,l+C-g),new mxPoint(f,l+C),new mxPoint(f,l)]);C=a.getCenterX();a=a.getCenterY();a=new mxPoint(C,a);d&&(b.x<f||b.x>f+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var g="0"!=mxUtils.getValue(c.style,"fixedSize","0"),f=g?E.prototype.fixedSize:E.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,
+"size",f));var h=a.x,l=a.y,m=a.width,C=a.height,t=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(g=g?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),l=[new mxPoint(h,l),new mxPoint(h+m-g,l),new mxPoint(h+m,a),new mxPoint(h+m-g,l+C),new mxPoint(h,l+C),new mxPoint(h+g,a),new mxPoint(h,l)]):c==mxConstants.DIRECTION_WEST?(g=g?Math.max(0,Math.min(m,f)):m*Math.max(0,
+Math.min(1,f)),l=[new mxPoint(h+g,l),new mxPoint(h+m,l),new mxPoint(h+m-g,a),new mxPoint(h+m,l+C),new mxPoint(h+g,l+C),new mxPoint(h,a),new mxPoint(h+g,l)]):c==mxConstants.DIRECTION_NORTH?(g=g?Math.max(0,Math.min(C,f)):C*Math.max(0,Math.min(1,f)),l=[new mxPoint(h,l+g),new mxPoint(t,l),new mxPoint(h+m,l+g),new mxPoint(h+m,l+C),new mxPoint(t,l+C-g),new mxPoint(h,l+C),new mxPoint(h,l+g)]):(g=g?Math.max(0,Math.min(C,f)):C*Math.max(0,Math.min(1,f)),l=[new mxPoint(h,l),new mxPoint(t,l+g),new mxPoint(h+
+m,l),new mxPoint(h+m,l+C-g),new mxPoint(t,l+C),new mxPoint(h,l+C-g),new mxPoint(h,l)]);t=new mxPoint(t,a);d&&(b.x<h||b.x>h+m?t.y=b.y:t.x=b.x);return mxUtils.getPerimeterPoint(l,t,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var g=y.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));var f=a.x,h=a.y,l=a.width,m=a.height,C=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(g=m*Math.max(0,Math.min(1,g)),h=[new mxPoint(C,h),new mxPoint(f+l,h+g),new mxPoint(f+l,h+m-g),new mxPoint(C,h+m),new mxPoint(f,h+m-g),new mxPoint(f,h+g),new mxPoint(C,h)]):(g=l*Math.max(0,Math.min(1,g)),h=[new mxPoint(f+g,h),new mxPoint(f+l-g,h),new mxPoint(f+l,a),new mxPoint(f+l-g,h+m),new mxPoint(f+g,h+m),new mxPoint(f,a),new mxPoint(f+g,h)]);C=new mxPoint(C,a);d&&(b.x<f||b.x>f+
+l?C.y=b.y:C.x=b.x);return mxUtils.getPerimeterPoint(h,C,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,c,b,d,g){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,g);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(T,mxShape);T.prototype.size=
+10;T.prototype.inset=2;T.prototype.paintBackground=function(a,c,b,d,g){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,f+h);a.lineTo(d/2,g);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-h,f/2);a.quadTo((d-f)/2-h,f+h,d/2,f+h);a.quadTo((d+f)/2+h,f+h,(d+f)/2+h,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",T);mxUtils.extend(W,mxShape);W.prototype.paintBackground=
+function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",W);mxUtils.extend(V,mxShape);V.prototype.inset=2;V.prototype.paintBackground=function(a,c,b,d,g){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,f,d-2*f,g-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d/2,g);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
+V);mxUtils.extend(J,mxCylinder);J.prototype.jettyWidth=32;J.prototype.jettyHeight=12;J.prototype.redrawPath=function(a,c,b,d,g,f){var h=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=h/2;var h=b+h/2,l=.3*g-c/2,m=.7*g-c/2;f?(a.moveTo(b,l),a.lineTo(h,l),a.lineTo(h,l+c),a.lineTo(b,l+c),a.moveTo(b,m),a.lineTo(h,m),a.lineTo(h,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,g),a.lineTo(b,g),
+a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",J);mxUtils.extend(ha,mxDoubleEllipse);ha.prototype.outerStroke=!0;ha.prototype.paintVertexShape=function(a,c,b,d,g){var f=Math.min(4,Math.min(d/5,g/5));0<d&&0<g&&(a.ellipse(c+f,b+f,d-2*f,g-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,g),a.stroke())};mxCellRenderer.registerShape("endState",
+ha);mxUtils.extend(na,ha);na.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",na);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=4;Y.prototype.isOpenEnded=function(){return!0};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Y.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Y);mxUtils.extend(ba,mxArrowConnector);ba.prototype.defaultWidth=10;
+ba.prototype.defaultArrowWidth=20;ba.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ba.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ba.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ba);mxUtils.extend(N,mxActor);
+N.prototype.size=30;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,g),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,g)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",N);mxUtils.extend(H,mxRectangleShape);H.prototype.dx=20;H.prototype.dy=20;H.prototype.isHtmlAllowed=
+function(){return!1};H.prototype.paintForeground=function(a,c,b,d,g){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*h,g*h));h=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);
+a.end();a.stroke();a.begin();a.moveTo(c+h,b);a.lineTo(c+h,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",H);mxUtils.extend(U,mxActor);U.prototype.dx=20;U.prototype.dy=20;U.prototype.redrawPath=function(a,c,b,d,g){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",U);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.lineTo(0,g);a.end();a.moveTo(d,0);a.lineTo(d,g);a.end();a.moveTo(0,g/2);a.lineTo(d,g/2);a.end()};mxCellRenderer.registerShape("crossbar",L);mxUtils.extend(P,mxActor);P.prototype.dx=20;P.prototype.dy=
+20;P.prototype.redrawPath=function(a,c,b,d,g){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,g),new mxPoint((d-c)/2,g),new mxPoint((d-
+c)/2,b),new mxPoint(0,b)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",P);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,c,b,d,g){var f=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(g-f)/2;var f=b+f,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(d-c,f),new mxPoint(0,f)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("singleArrow",R);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,b,d,g){var f=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));
+b=(g-f)/2;var f=b+f,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,g/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(c,g)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ja);mxUtils.extend(D,mxActor);D.prototype.size=.1;D.prototype.redrawPath=function(a,c,b,d,g){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,g/2,d,g);a.lineTo(c,g);a.quadTo(c-2*c,g/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",D);mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.close();a.end()};mxCellRenderer.registerShape("or",ea);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.quadTo(d/2,g/2,0,0);a.close();
+a.end()};mxCellRenderer.registerShape("xor",X);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d/2,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,g),new mxPoint(0,g),new mxPoint(0,.8*c)],this.isRounded,b,!0);
+a.end()};mxCellRenderer.registerShape("loopLimit",Z);mxUtils.extend(ca,mxActor);ca.prototype.size=.375;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(a,c,b,d,g){c=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,g-c),new mxPoint(d/2,g),new mxPoint(0,g-c)],this.isRounded,b,!0);a.end()};
+mxCellRenderer.registerShape("offPageConnector",ca);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/2,b+g);a.lineTo(c+d,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",fa);mxUtils.extend(aa,mxEllipse);aa.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+g/2);a.lineTo(c+d,b+g/
+2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",aa);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*g);a.lineTo(c+.855*d,b+.855*g);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*g);a.lineTo(c+.145*d,b+.855*g);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",
+qa);mxUtils.extend(sa,mxRhombus);sa.prototype.paintVertexShape=function(a,c,b,d,g){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+g/2);a.lineTo(c+d,b+g/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",sa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,d,g){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+g/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+g);a.lineTo(c+d,b+g);a.lineTo(c+d/2,b+
+g/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",la);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(a,c,b,d,g){var f=b+g-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+g);a.moveTo(c,f);a.lineTo(c+10,f-5);a.moveTo(c,f);a.lineTo(c+10,f+5);a.moveTo(c,f);a.lineTo(c+d,f);a.moveTo(c+d,b);a.lineTo(c+d,b+g);a.moveTo(c+d,f);a.lineTo(c+d-10,f-5);a.moveTo(c+d,f);a.lineTo(c+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",oa);mxUtils.extend(va,mxEllipse);
va.prototype.paintVertexShape=function(a,c,b,d,g){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,b,d,g),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+d,b+g):a.moveTo(c+d,b+g),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+g):a.moveTo(c,b+g),"1"==mxUtils.getValue(this.style,
"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",va);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,b+g)):(a.moveTo(c,b+g/2),a.lineTo(c+d,b+g/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ka);mxUtils.extend(ta,mxActor);
-ta.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d-c,g);a.lineTo(0,g);a.close();a.end()};mxCellRenderer.registerShape("delay",ta);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(g,d);var h=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(g-h)/2;b=c+h;var f=(d-h)/2,h=f+h;a.moveTo(0,c);a.lineTo(f,c);a.lineTo(f,0);a.lineTo(h,0);a.lineTo(h,
-c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(h,b);a.lineTo(h,g);a.lineTo(f,g);a.lineTo(f,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ia);mxUtils.extend(fa,mxActor);fa.prototype.size=.25;fa.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,g/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d-c,g);a.lineTo(b,g);a.close();a.end()};mxCellRenderer.registerShape("display",
-fa);mxUtils.extend(ca,mxConnector);ca.prototype.origPaintEdgeShape=ca.prototype.paintEdgeShape;ca.prototype.paintEdgeShape=function(a,c,b){for(var d=[],g=0;g<c.length;g++)d.push(mxUtils.clone(c[g]));var g=a.state.dashed,h=a.state.fixDash;ca.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(g,h),ca.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};
-mxCellRenderer.registerShape("filledEdge",ca);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,d,g,h,f,l,m,p){var t=g*(f+m+1),v=h*(f+m+1);return function(){a.begin();
-a.moveTo(d.x-t/2-v/2,d.y-v/2+t/2);a.lineTo(d.x+v/2-3*t/2,d.y-3*v/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,g,h,f,l,m,p){var t=g*(f+m+1),v=h*(f+m+1);return function(){a.begin();a.moveTo(d.x-t/2-v/2,d.y-v/2+t/2);a.lineTo(d.x+v/2-3*t/2,d.y-3*v/2-t/2);a.moveTo(d.x-t/2+v/2,d.y-v/2-t/2);a.lineTo(d.x-v/2-3*t/2,d.y-3*v/2+t/2);a.stroke()}});mxMarker.addMarker("circle",ya);mxMarker.addMarker("circlePlus",function(a,c,b,d,g,h,f,l,m,p){var t=d.clone(),v=ya.apply(this,arguments),y=g*(f+
-2*m),w=h*(f+2*m);return function(){v.apply(this,arguments);a.begin();a.moveTo(t.x-g*m,t.y-h*m);a.lineTo(t.x-2*y+g*m,t.y-2*w+h*m);a.moveTo(t.x-y-w+h*m,t.y-w+y-g*m);a.lineTo(t.x+w-y-h*m,t.y-w-y+g*m);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,d,g,h,f,l,m,p){c=g*m*1.118;b=h*m*1.118;g*=f+m;h*=f+m;var t=d.clone();t.x-=c;t.y-=b;d.x+=1*-g-c;d.y+=1*-h-b;return function(){a.begin();a.moveTo(t.x,t.y);l?a.lineTo(t.x-g-h/2,t.y-h+g/2):a.lineTo(t.x+h/2-g,t.y-h-g/2);a.lineTo(t.x-g,t.y-h);a.close();p?
-a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,g,h,f,l,m,p,t){h*=l+p;f*=l+p;var v=g.clone();return function(){c.begin();c.moveTo(v.x,v.y);m?c.lineTo(v.x-h-f/a,v.y-f+h/a):c.lineTo(v.x+f/a-h,v.y-f-h/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Fa=function(a,c,b){return ua(a,["width"],c,function(c,d,g,h,f){f=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(h.x+d*c/4+g*f/2,h.y+g*c/4-d*f/2)},function(c,d,g,h,f,
-l){c=Math.sqrt(mxUtils.ptSegDistSq(h.x,h.y,f.x,f.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ua=function(a,c,b,d,g){return Q(a,c,function(c){var g=a.absolutePoints,h=g.length-1;c=a.view.translate;var f=a.view.scale,l=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,p=Math.sqrt(h*h+m*m),l=d.call(this,p,h/p,m/p,l,g);return new mxPoint(l.x/f-c.x,l.y/f-c.y)},function(c,d,h){var f=a.absolutePoints,l=f.length-1;c=a.view.translate;var m=a.view.scale,p=b?f[0]:f[l],f=b?f[1]:f[l-1],l=f.x-p.x,
-t=f.y-p.y,v=Math.sqrt(l*l+t*t);d.x=(d.x+c.x)*m;d.y=(d.y+c.y)*m;g.call(this,v,l/v,t/v,p,f,d,h)})},pa=function(a){return function(c){return[Q(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",S.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",S.prototype.arrowSize)));return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,
-Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Da=function(a,c,b){return function(d){var g=[Q(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,
-!1)&&g.push(ma(d));return g}},za=function(a,c,b,d,g){b=null!=b?b:1;return function(h){var f=[Q(h,["size"],function(c){var b=null!=g?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",b?g:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var f=null!=g?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=f?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));f&&!mxEvent.isAltDown(d.getEvent())&&
-(a=h.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ma(h));return f}},Ga=function(a){return function(c){var b=[Q(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
-!1)&&b.push(ma(c));return b}},xa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c}},ma=function(a,c){return Q(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,g),b.y+d)}g=Math.max(0,parseFloat(mxUtils.getValue(a.style,
+ta.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d-c,g);a.lineTo(0,g);a.close();a.end()};mxCellRenderer.registerShape("delay",ta);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(g,d);var f=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(g-f)/2;b=c+f;var h=(d-f)/2,f=h+f;a.moveTo(0,c);a.lineTo(h,c);a.lineTo(h,0);a.lineTo(f,0);a.lineTo(f,
+c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(f,b);a.lineTo(f,g);a.lineTo(h,g);a.lineTo(h,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ia);mxUtils.extend(ga,mxActor);ga.prototype.size=.25;ga.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,g/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d-c,g);a.lineTo(b,g);a.close();a.end()};mxCellRenderer.registerShape("display",
+ga);mxUtils.extend(da,mxConnector);da.prototype.origPaintEdgeShape=da.prototype.paintEdgeShape;da.prototype.paintEdgeShape=function(a,c,b){for(var d=[],g=0;g<c.length;g++)d.push(mxUtils.clone(c[g]));var g=a.state.dashed,f=a.state.fixDash;da.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(g,f),da.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};
+mxCellRenderer.registerShape("filledEdge",da);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,d,g,f,h,l,m,t){var q=g*(h+m+1),v=f*(h+m+1);return function(){a.begin();
+a.moveTo(d.x-q/2-v/2,d.y-v/2+q/2);a.lineTo(d.x+v/2-3*q/2,d.y-3*v/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,g,f,h,l,m,t){var q=g*(h+m+1),v=f*(h+m+1);return function(){a.begin();a.moveTo(d.x-q/2-v/2,d.y-v/2+q/2);a.lineTo(d.x+v/2-3*q/2,d.y-3*v/2-q/2);a.moveTo(d.x-q/2+v/2,d.y-v/2-q/2);a.lineTo(d.x-v/2-3*q/2,d.y-3*v/2+q/2);a.stroke()}});mxMarker.addMarker("circle",ya);mxMarker.addMarker("circlePlus",function(a,c,b,d,g,f,h,l,m,t){var q=d.clone(),v=ya.apply(this,arguments),y=g*(h+
+2*m),w=f*(h+2*m);return function(){v.apply(this,arguments);a.begin();a.moveTo(q.x-g*m,q.y-f*m);a.lineTo(q.x-2*y+g*m,q.y-2*w+f*m);a.moveTo(q.x-y-w+f*m,q.y-w+y-g*m);a.lineTo(q.x+w-y-f*m,q.y-w-y+g*m);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,d,g,f,h,l,m,t){c=g*m*1.118;b=f*m*1.118;g*=h+m;f*=h+m;var q=d.clone();q.x-=c;q.y-=b;d.x+=1*-g-c;d.y+=1*-f-b;return function(){a.begin();a.moveTo(q.x,q.y);l?a.lineTo(q.x-g-f/2,q.y-f+g/2):a.lineTo(q.x+f/2-g,q.y-f-g/2);a.lineTo(q.x-g,q.y-f);a.close();t?
+a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,g,f,h,l,m,q,t){f*=l+q;h*=l+q;var v=g.clone();return function(){c.begin();c.moveTo(v.x,v.y);m?c.lineTo(v.x-f-h/a,v.y-h+f/a):c.lineTo(v.x+h/a-f,v.y-h-f/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Fa=function(a,c,b){return ua(a,["width"],c,function(c,d,g,f,h){h=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(f.x+d*c/4+g*h/2,f.y+g*c/4-d*h/2)},function(c,d,g,f,h,
+l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,h.x,h.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ua=function(a,c,b,d,g){return S(a,c,function(c){var g=a.absolutePoints,f=g.length-1;c=a.view.translate;var h=a.view.scale,l=b?g[0]:g[f],g=b?g[1]:g[f-1],f=g.x-l.x,m=g.y-l.y,q=Math.sqrt(f*f+m*m),l=d.call(this,q,f/q,m/q,l,g);return new mxPoint(l.x/h-c.x,l.y/h-c.y)},function(c,d,f){var h=a.absolutePoints,l=h.length-1;c=a.view.translate;var m=a.view.scale,q=b?h[0]:h[l],h=b?h[1]:h[l-1],l=h.x-q.x,
+t=h.y-q.y,v=Math.sqrt(l*l+t*t);d.x=(d.x+c.x)*m;d.y=(d.y+c.y)*m;g.call(this,v,l/v,t/v,q,h,d,f)})},pa=function(a){return function(c){return[S(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,
+Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Da=function(a,c,b){return function(d){var g=[S(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,
+!1)&&g.push(ma(d));return g}},za=function(a,c,b,d,g){b=null!=b?b:1;return function(f){var h=[S(f,["size"],function(c){var b=null!=g?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",b?g:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var h=null!=g?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=h?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));h&&!mxEvent.isAltDown(d.getEvent())&&
+(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(ma(f));return h}},Ga=function(a){return function(c){var b=[S(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
+!1)&&b.push(ma(c));return b}},xa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c}},ma=function(a,c){return S(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,g),b.y+d)}g=Math.max(0,parseFloat(mxUtils.getValue(a.style,
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*g),b.y+d)},function(c,b,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},
-Q=function(a,c,b,d,g,h){var f=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);f.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};f.getPosition=b;f.setPosition=d;f.ignoreGrid=null!=g?g:!0;if(h){var l=f.positionChanged;f.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return f},Aa={link:function(a){return[Fa(a,!0,10),Fa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,
-mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,g,h){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;h=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+b*(h+a.shape.strokewidth*a.view.scale)+d*c/2,g.y+d*(h+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,g,h,f,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(h.x,
-h.y,f.x,f.y,l.x,l.y));d=mxUtils.ptLineDist(h.x,h.y,h.x+g,h.y-d,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=
-a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,g,h){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;h=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+b*(h+a.shape.strokewidth*a.view.scale)+d*c/2,g.y+d*(h+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,g,h,f,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(h.x,h.y,f.x,
-f.y,l.x,l.y));d=mxUtils.ptLineDist(h.x,h.y,h.x+g,h.y-d,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<
-c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,g,h){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;h=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(g.x+b*(h+a.shape.strokewidth*a.view.scale)-d*c/2,g.y+d*(h+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,g,h,f,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(h.x,h.y,f.x,f.y,l.x,l.y));d=mxUtils.ptLineDist(h.x,h.y,h.x+g,h.y-d,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);
-mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,g,h){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;h=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+
-b*(h+a.shape.strokewidth*a.view.scale)-d*c/2,g.y+d*(h+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,g,h,f,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(h.x,h.y,f.x,f.y,l.x,l.y));d=mxUtils.ptLineDist(h.x,h.y,h.x+g,h.y-d,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],
-a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[Q(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,
+S=function(a,c,b,d,g,f){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};h.getPosition=b;h.setPosition=d;h.ignoreGrid=null!=g?g:!0;if(f){var l=h.positionChanged;h.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},Aa={link:function(a){return[Fa(a,!0,10),Fa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,
+mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,g,f){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+b*(f+a.shape.strokewidth*a.view.scale)+d*c/2,g.y+d*(f+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,g,f,h,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,
+f.y,h.x,h.y,l.x,l.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+g,f.y-d,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=
+a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,g,f){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+b*(f+a.shape.strokewidth*a.view.scale)+d*c/2,g.y+d*(f+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,g,f,h,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,h.x,
+h.y,l.x,l.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+g,f.y-d,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<
+c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,g,f){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
+5)*a.view.scale;return new mxPoint(g.x+b*(f+a.shape.strokewidth*a.view.scale)-d*c/2,g.y+d*(f+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,g,f,h,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,h.x,h.y,l.x,l.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+g,f.y-d,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);
+mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,g,f){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+
+b*(f+a.shape.strokewidth*a.view.scale)-d*c/2,g.y+d*(f+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,g,f,h,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,h.x,h.y,l.x,l.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+g,f.y-d,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],
+a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[S(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,
mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=
-parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ma(a,b/2))}return c},label:xa(),ext:xa(),rectangle:xa(),triangle:xa(),rhombus:xa(),umlLifeline:function(a){return[Q(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[Q(a,
-["width","height"],function(a){var c=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),b=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},
-process:function(a){var c=[Q(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},cross:function(a){return[Q(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",ia.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[Q(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[Q(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",M.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},dataStorage:function(a){return[Q(a,
-["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[Q(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
-mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),Q(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+
-c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),Q(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-
-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},internalStorage:function(a){var c=[Q(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",G.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
-G.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},corner:function(a){return[Q(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
-T.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[Q(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",O.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",O.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=
-Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:pa(1),doubleArrow:pa(.5),folder:function(a){return[Q(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==
-mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[Q(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));
-return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[Q(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[Q(a,["size"],function(a){var c=
-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:za(D.prototype.size,!0,null,!0,D.prototype.fixedSize),hexagon:za(y.prototype.size,!0,.5,!0),curlyBracket:za(l.prototype.size,!1),display:za(fa.prototype.size,!1),cube:Da(1,a.prototype.size,!1),card:Da(.5,r.prototype.size,!0),loopLimit:Da(.5,Y.prototype.size,
-!0),trapezoid:Ga(.5),parallelogram:Ga(1)};Graph.createHandle=Q;Graph.handleFactory=Aa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Aa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Aa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};
+parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ma(a,b/2))}return c},label:xa(),ext:xa(),rectangle:xa(),triangle:xa(),rhombus:xa(),umlLifeline:function(a){return[S(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[S(a,
+["width","height"],function(a){var c=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),b=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},
+process:function(a){var c=[S(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",q.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},cross:function(a){return[S(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",ia.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[S(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[S(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",N.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},dataStorage:function(a){return[S(a,
+["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[S(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
+mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),S(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+
+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),S(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-
+c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},internalStorage:function(a){var c=[S(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",H.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
+H.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},corner:function(a){return[S(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",U.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
+U.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[S(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",P.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=
+Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:pa(1),doubleArrow:pa(.5),folder:function(a){return[S(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==
+mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[S(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));
+return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[S(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[S(a,["size"],function(a){var c=
+Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:za(E.prototype.size,!0,null,!0,E.prototype.fixedSize),hexagon:za(y.prototype.size,!0,.5,!0),curlyBracket:za(l.prototype.size,!1),display:za(ga.prototype.size,!1),cube:Da(1,a.prototype.size,!1),card:Da(.5,r.prototype.size,!0),loopLimit:Da(.5,Z.prototype.size,
+!0),trapezoid:Ga(.5),parallelogram:Ga(1)};Graph.createHandle=S;Graph.handleFactory=Aa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Aa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Aa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};
mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Aa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ba=new mxPoint(1,0),Ca=new mxPoint(1,0),pa=mxUtils.toRadians(-30),Ba=mxUtils.getRotatedPoint(Ba,Math.cos(pa),Math.sin(pa)),pa=mxUtils.toRadians(-150),
-Ca=mxUtils.getRotatedPoint(Ca,Math.cos(pa),Math.sin(pa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,g){var h=a.view;d=null!=d&&0<d.length?d[0]:null;var f=a.absolutePoints,l=f[0],f=f[f.length-1];null!=d&&(d=h.transformControlPoint(a,d));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==f&&null!=b&&(f=new mxPoint(b.getCenterX(),b.getCenterY()));var m=Ba.x,p=Ba.y,t=Ca.x,v=Ca.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=l){a=function(a,c,
-b){a-=w.x;var d=c-w.y;c=(v*a-t*d)/(m*v-p*t);a=(p*a-m*d)/(p*t-m*v);y?(b&&(w=new mxPoint(w.x+m*c,w.y+p*c),g.push(w)),w=new mxPoint(w.x+t*a,w.y+v*a)):(b&&(w=new mxPoint(w.x+t*a,w.y+v*a),g.push(w)),w=new mxPoint(w.x+m*c,w.y+p*c));g.push(w)};var w=l;null==d&&(d=new mxPoint(l.x+(f.x-l.x)/2,l.y+(f.y-l.y)/2));a(d.x,d.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ma=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==
-mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ma.apply(this,arguments)};b.prototype.constraints=[];f.prototype.constraints=[];w.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,
-1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;v.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
-mxRectangleShape.prototype.constraints;r.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=mxRectangleShape.prototype.constraints;C.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;
-ka.prototype.constraints=mxEllipse.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),
-!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),
-new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];
-n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,
-1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
-.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,
-.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];g.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;c.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;O.prototype.constraints=
-null;T.prototype.constraints=null;K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];
-S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];B.prototype.constraints=null;
-da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),
-!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+Ca=mxUtils.getRotatedPoint(Ca,Math.cos(pa),Math.sin(pa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,g){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var h=a.absolutePoints,l=h[0],h=h[h.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));var m=Ba.x,q=Ba.y,t=Ca.x,v=Ca.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=h&&null!=l){a=function(a,c,
+b){a-=w.x;var d=c-w.y;c=(v*a-t*d)/(m*v-q*t);a=(q*a-m*d)/(q*t-m*v);y?(b&&(w=new mxPoint(w.x+m*c,w.y+q*c),g.push(w)),w=new mxPoint(w.x+t*a,w.y+v*a)):(b&&(w=new mxPoint(w.x+t*a,w.y+v*a),g.push(w)),w=new mxPoint(w.x+m*c,w.y+q*c));g.push(w)};var w=l;null==d&&(d=new mxPoint(l.x+(h.x-l.x)/2,l.y+(h.y-l.y)/2));a(d.x,d.y,!0);a(h.x,h.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ma=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==
+mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ma.apply(this,arguments)};b.prototype.constraints=[];f.prototype.getConstraints=function(a,c,b){a=[];var d=Math.tan(mxUtils.toRadians(30)),g=(.5-d)/2,d=Math.min(c,b/(.5+d));c=(c-d)/2;b=(b-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*d,b+d*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+d,
+b+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+d,b+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*d,b+(1-g)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.75*d));return a};w.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",
+this.position));var g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,.5*(b-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)));c>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];
+mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=
+mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;v.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),
+!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));return a};r.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,b-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)));return a};p.prototype.constraints=mxRectangleShape.prototype.constraints;H.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=
+mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;ga.prototype.getConstraints=function(a,c,b){a=[];var d=Math.min(c,b/2),g=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(g+c-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(g+c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));return a};Z.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=
+mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
+1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
+1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,
+1),!1)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),
+!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,
+.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
+.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
+.25),!1)];g.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;c.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
+!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;P.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*c+.25*d,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),.5*(b+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),.5*(b+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*d,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*g));return a};U.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),g));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];R.prototype.getConstraints=function(a,c,b){a=[];var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize)))),d=(b-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-g),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-g,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-g),b-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,b-d));return a};ja.prototype.getConstraints=function(a,c,b){a=[];var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize)))),d=(b-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c-g,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));return a};ia.prototype.getConstraints=function(a,c,b){a=[];var d=Math.min(b,c),g=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(b-g)/2,f=d+g,h=(c-g)/2,g=h+g;a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,h,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,b-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,b));a.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+g),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(c+g),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,d));return a};B.prototype.constraints=
+null;ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
+.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)d.model.contains(c[b])&&(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,f=b.editor,d=f.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(b.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);f.graph.setSelectionCells(f.graph.importGraphModel(c.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));b.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",
function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var c=0;c<b.length&&
-a;c++)a=a&&d.model.isEdge(b[c]);var g=d.view.translate,h=d.view.scale,f=g.x,p=g.y,g=null;if(1==b.length&&a){var m=d.getCellGeometry(b[0]);null!=m&&(g=m.getTerminalPoint(!0))}g=null!=g?g:d.getBoundingBoxFromGeometry(b,a);if(null!=g){var t=Math.round(d.snap(d.popupMenuHandler.triggerX/h-f)),k=Math.round(d.snap(d.popupMenuHandler.triggerY/h-p));d.cellsMoved(b,t-g.x,k-g.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&
+a;c++)a=a&&d.model.isEdge(b[c]);var g=d.view.translate,f=d.view.scale,l=g.x,t=g.y,g=null;if(1==b.length&&a){var m=d.getCellGeometry(b[0]);null!=m&&(g=m.getTerminalPoint(!0))}g=null!=g?g:d.getBoundingBoxFromGeometry(b,a);if(null!=g){var q=Math.round(d.snap(d.popupMenuHandler.triggerX/f-l)),k=Math.round(d.snap(d.popupMenuHandler.triggerY/f-t));d.cellsMoved(b,q-g.x,k-g.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&
(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shit+X");this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var f=d.getSelectionCells();for(a=0;a<f.length;a++)if(d.getModel().isVertex(f[a])){var c=d.getCellGeometry(f[a]);null!=c&&(c=c.clone(),c.width=b.copiedSize.width,c.height=b.copiedSize.height,d.getModel().setGeometry(f[a],c))}}finally{d.getModel().endUpdate()}}},
null,null,"Alt+Shit+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){d.setSelectionCells(d.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){d.turnShapes(d.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",
function(){d.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,
@@ -2611,10 +2630,10 @@ null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.fo
0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==d.getSelectionCount()&&0==d.getModel().getChildCount(d.getSelectionCell())?d.setCellStyles("container","0"):d.setSelectionCells(d.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();
b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),c="";if(mxUtils.isNode(d.value)){var g=d.value.getAttribute("tooltip");null!=g&&(c=g)}c=new TextareaDialog(b,mxResources.get("editTooltip")+":",c,function(c){a.setTooltipForCell(d,c)});b.showDialog(c.container,320,200,!0,!0);c.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());
null!=a&&d.openLink(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),c=a.getLinkForCell(d)||"";b.showLinkDialog(c,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(d,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=
-k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var c=null,g=d.getLinkTitle(a);null!=b&&0<b.length&&(c=b[0].iconUrl,g=b[0].name||b[0].type,g=g.charAt(0).toUpperCase()+g.substring(1),30<g.length&&(g=g.substring(0,30)+"..."));var h=d.getFreeInsertPoint(),c=new mxCell(g,new mxGeometry(h.x,h.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
+k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var c=null,g=d.getLinkTitle(a);null!=b&&0<b.length&&(c=b[0].iconUrl,g=b[0].name||b[0].type,g=g.charAt(0).toUpperCase()+g.substring(1),30<g.length&&(g=g.substring(0,30)+"..."));var f=d.getFreeInsertPoint(),c=new mxCell(g,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));c.vertex=!0;d.setLinkForCell(c,a);d.cellSizeUpdated(c,!0);d.getModel().beginUpdate();try{c=d.addCell(c),d.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{d.getModel().endUpdate()}d.setSelectionCell(c);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=
-a.getSelectedElement(),c=a.getParentByName(d,"A",a.cellEditor.textarea),g="";if(null==c&&null!=d&&null!=d.getElementsByTagName)for(var h=d.getElementsByTagName("a"),f=0;f<h.length&&null==c;f++)h[f].textContent==d.textContent&&(a.selectNode(h[f]),c=h[f]);null!=c&&"A"==c.nodeName&&(g=c.getAttribute("href")||"");var p=a.cellEditor.saveSelection();b.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(p);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?
-this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().getChildCount(c))d.updateGroupBounds([c],20);else{var g=d.view.getState(c),h=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=g&&null!=g.text&&null!=h&&d.isWrapping(c)?(h=h.clone(),h.height=g.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(c,h)):
+a.getSelectedElement(),c=a.getParentByName(d,"A",a.cellEditor.textarea),g="";if(null==c&&null!=d&&null!=d.getElementsByTagName)for(var f=d.getElementsByTagName("a"),l=0;l<f.length&&null==c;l++)f[l].textContent==d.textContent&&(a.selectNode(f[l]),c=f[l]);null!=c&&"A"==c.nodeName&&(g=c.getAttribute("href")||"");var t=a.cellEditor.saveSelection();b.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(t);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?
+this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().getChildCount(c))d.updateGroupBounds([c],20);else{var g=d.view.getState(c),f=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=g&&null!=g.text&&null!=f&&d.isWrapping(c)?(f=f.clone(),f.height=g.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(c,f)):
d.updateCellSize(c)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){var f="1";d.stopEditing();d.getModel().beginUpdate();try{if("1"==a.style.html){var f=null,c=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=c;c=mxUtils.extractTextWithWhitespace(g.childNodes);
d.cellLabelChanged(a.cell,c)}else c=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(c));d.setCellStyles("html",f);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=f?f:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();
null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",f=d.getView().getState(d.getSelectionCell());null!=f&&(a=f.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);
@@ -2627,8 +2646,8 @@ function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("g
n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});
n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});
n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});
-n.isEnabled=k;n=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(b.showDialog((new AboutDialog(b)).container,
-320,280,!0,!0,function(){q=!1}),q=!0)},null,null,"F1"));n=mxUtils.bind(this,function(a,b,c,g){return this.addAction(a,function(){if(null!=c&&d.cellEditor.isContentEditing())c();else{d.stopEditing(!1);d.getModel().beginUpdate();try{d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b),(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
+n.isEnabled=k;n=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,
+320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));n=mxUtils.bind(this,function(a,b,c,g){return this.addAction(a,function(){if(null!=c&&d.cellEditor.isContentEditing())c();else{d.stopEditing(!1);d.getModel().beginUpdate();try{d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b),(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)})}finally{d.getModel().endUpdate()}}},null,null,g)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",
!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});
this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,
@@ -2642,32 +2661,33 @@ function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.
if(null!=a&&d.getModel().isEdge(a)){var b=f.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var c=d.view.translate,g=d.view.scale,h=c.x,c=c.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=l;)h+=l.x,c+=l.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);h=Math.round(d.snap(d.popupMenuHandler.triggerX/g-h));g=Math.round(d.snap(d.popupMenuHandler.triggerY/g-c));b.addPointAt(b.state,h,g)}}});this.addAction("removeWaypoint",function(){var a=
b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().isEdge(c)){var g=d.getCellGeometry(c);null!=g&&(g=g.clone(),g.points=null,d.getModel().setGeometry(c,g))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",mxUtils.bind(this,
function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=d.getView().getState(d.getSelectionCell()),c="";null!=
-f&&(c=f.style[mxConstants.STYLE_IMAGE]||c);var g=d.cellEditor.saveSelection();b.showImageDialog(a,c,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(g),d.insertImage(a,c,b);else{var h=d.getSelectionCells();if(null!=a&&(0<a.length||0<h.length)){var f=null;d.getModel().beginUpdate();try{if(0==h.length){var l=d.getFreeInsertPoint(),f=h=[d.insertVertex(d.getDefaultParent(),null,"",l.x,l.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-d.fireEvent(new mxEventObject("cellsInserted","cells",f))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,h);var p=d.view.getState(h[0]),k=null!=p?p.style:d.getCellStyle(h[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",h):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,h);if(1==d.getSelectionCount()&&null!=c&&null!=b){var y=h[0],v=d.getModel().getGeometry(y);null!=v&&(v=v.clone(),v.width=c,v.height=b,
-d.getModel().setGeometry(y,v))}}finally{d.getModel().endUpdate()}null!=f&&(d.setSelectionCells(f),d.scrollCellToVisible(f[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",
+f&&(c=f.style[mxConstants.STYLE_IMAGE]||c);var g=d.cellEditor.saveSelection();b.showImageDialog(a,c,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(g),d.insertImage(a,c,b);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var h=null;d.getModel().beginUpdate();try{if(0==f.length){var l=d.getFreeInsertPoint(),h=f=[d.insertVertex(d.getDefaultParent(),null,"",l.x,l.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+d.fireEvent(new mxEventObject("cellsInserted","cells",h))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var t=d.view.getState(f[0]),k=null!=t?t.style:d.getCellStyle(f[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&&null!=c&&null!=b){var y=f[0],v=d.getModel().getGeometry(y);null!=v&&(v=v.clone(),v.width=c,v.height=b,
+d.getModel().setGeometry(y,v))}}finally{d.getModel().endUpdate()}null!=h&&(d.setSelectionCells(h),d.scrollCellToVisible(h[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",
function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+
"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),
b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};
Actions.prototype.addAction=function(a,b,f,d,k){var n;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),n=mxResources.get(a)+"..."):n=mxResources.get(a);return this.put(a,new Action(n,b,f,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,f,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}
-mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.stats={joined:0,merged:0,lastMerge:0,lastMergeTime:0,lastOpenTime:0,shadowState:0,opened:0,closed:0,destroyed:0,fileMerged:0,fileSaved:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.stats={joined:0,merged:0,lastMerge:0,lastMergeTime:0,lastOpenTime:0,lastIgnored:0,shadowState:0,opened:0,closed:0,destroyed:0,fileMerged:0,fileSaved:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;
DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
DrawioFile.prototype.updateFile=function(a,b,f,d){null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b(e):this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b(e):null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(n){null!=b&&b(n)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,f,d){try{this.stats.fileMerged++;var k=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkPages(k,"mergeFile init");this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(k,this.ui.pages):null;var n=[this.ui.diffPages(null!=d?d:k,this.shadowPages)];if(this.ignorePatches(n))this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());
-else{var q=this.ui.patchPages(k,n[0]);this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());this.checkPages(q,"mergeFile patched");d={};var r=this.ui.getHashValueForPages(q,d),k={},u=this.ui.getHashValueForPages(this.shadowPages,k);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",n,"checksum",u==r,r);if(null!=r&&r!=u){var c=this.compressReportData(this.getAnonymizedXmlForPages(q));this.checksumError(f,n,(null!=d?"Details: "+JSON.stringify(d):"")+
-"\nChecksum: "+r+"\nCurrent: "+u+(null!=k?"\nCurrent Details: "+JSON.stringify(k):"")+"\nPatched:\n"+c);return}this.patch(n,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages(this.ui.pages,"mergeFile done")}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(g){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(g);try{this.sendErrorReport("Error in mergeFile",
-null,g)}catch(h){}}};DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),f=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);f.appendChild(k)}return mxUtils.getPrettyXml(f)};
+DrawioFile.prototype.mergeFile=function(a,b,f,d){try{this.stats.fileMerged++;var k=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkPages(k,"mergeFile init");var n=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=n&&0<n.length){this.shadowPages=n;this.backupPatch=this.isModified()?this.ui.diffPages(k,this.ui.pages):null;var p=[this.ui.diffPages(null!=d?d:k,this.shadowPages)];if(this.ignorePatches(p))this.stats.shadowState=
+this.ui.hashValue(a.getCurrentEtag());else{var r=this.ui.patchPages(k,p[0]);this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());this.checkPages(r,"mergeFile patched");d={};var u=this.ui.getHashValueForPages(r,d),k={},c=this.ui.getHashValueForPages(this.shadowPages,k);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",p,"checksum",c==u,u);if(null!=u&&u!=c){var g=this.compressReportData(this.getAnonymizedXmlForPages(r));this.checksumError(f,p,(null!=
+d?"Details: "+JSON.stringify(d):"")+"\nChecksum: "+u+"\nCurrent: "+c+(null!=k?"\nCurrent Details: "+JSON.stringify(k):"")+"\nPatched:\n"+g);return}this.patch(p,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages(this.ui.pages,"mergeFile done")}}else try{0==this.stats.lastIgnored&&this.sendErrorReport("Ignored empty pages in mergeFile","File Data: "+this.compressReportData(this.ui.anonymizeString(a.data),null,500)),this.stats.lastIgnored=(new Date).toISOString()}catch(h){}this.inConflictState=
+this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(h){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(h);try{this.sendErrorReport("Error in mergeFile",null,h)}catch(l){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),f=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);f.appendChild(k)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.checkPages=function(a,b){if(this.ui.getCurrentFile()==this&&(null==a||0==a.length)){var f=null==this.shadowData?"null":this.compressReportData(this.ui.anonymizeString(this.shadowData),null,5E3);this.sendErrorReport("Pages is null or empty","Shadow: "+(null!=a?a.length:"null")+"\nShadowPages: "+(null!=this.shadowPages?this.shadowPages.length:"null")+(null!=b?"\nInfo: "+b:"")+"\nShadowData: "+f)}};
DrawioFile.prototype.compressReportData=function(a,b,f){null!=a&&a.length>(null!=b?b:1E4)&&(a=this.ui.editor.graph.compress(a)+"\n");null!=f&&null!=a&&a.length>f&&(a=a.substring(0,f)+"[...]");return a};
DrawioFile.prototype.checksumError=function(a,b,f,d){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var k=Error(),n=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=f?f:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nHeadRevision:\n"+a:""),k,7E4)});null==d?n(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?n(a):n(null)}),function(){})}catch(q){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,f,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.getCurrentUser(),q=null!=n?this.ui.hashValue(n.id):"unknown",r=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var u=this.getTitle(),c=u.lastIndexOf("."),n="xml";0<c&&(n=u.substring(c));var g=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+
-" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+n+")\nUser="+q+" ("+r+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+(null!=f?"\nError="+f:"")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+"\n\nShadow:\n"+k+"\n\nStack:\n"+g,d)}catch(h){}};
+25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=f?f:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nMaster:\n"+a:""),k,7E4)});null==d?n(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?n(a):n(null)}),function(){})}catch(p){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,f,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.getCurrentUser(),p=null!=n?this.ui.hashValue(n.id):"unknown",r=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var u=this.getTitle(),c=u.lastIndexOf("."),n="xml";0<c&&(n=u.substring(c));var g=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+
+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+n+")\nUser="+p+" ("+r+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+(null!=f?"\nError="+f:"")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+"\n\nShadow:\n"+k+"\n\nStack:\n"+g,d)}catch(h){}};
DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),f=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,b,f);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);
null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,f=0;f<a.length&&b;f++)b=b&&0==Object.keys(a[f]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var f=this.ui.editor.undoManager,d=f.history.slice(),k=f.indexOfNextAdd,n=this.ui.editor.graph;n.container.style.visibility="hidden";var q=this.changeListenerEnabled;this.changeListenerEnabled=!1;var r=n.foldingEnabled,u=n.mathEnabled,c=n.cellRenderer.redraw;n.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());c.apply(this,arguments)};n.model.beginUpdate();try{for(var g=
-0;g<a.length;g++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[g],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{n.model.endUpdate();n.container.style.visibility="";n.cellRenderer.redraw=c;this.changeListenerEnabled=q;f.history=d;f.indexOfNextAdd=k;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)u!=
+DrawioFile.prototype.patch=function(a,b){var f=this.ui.editor.undoManager,d=f.history.slice(),k=f.indexOfNextAdd,n=this.ui.editor.graph;n.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var r=n.foldingEnabled,u=n.mathEnabled,c=n.cellRenderer.redraw;n.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());c.apply(this,arguments)};n.model.beginUpdate();try{for(var g=
+0;g<a.length;g++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[g],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{n.model.endUpdate();n.container.style.visibility="";n.cellRenderer.redraw=c;this.changeListenerEnabled=p;f.history=d;f.indexOfNextAdd=k;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)u!=
n.mathEnabled?(this.ui.editor.updateGraphComponents(),n.refresh()):(r!=n.foldingEnabled?n.view.revalidate():n.view.validate(),n.sizeDidChange()),null!=this.ui.format&&n.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,b,f,d,k,n){if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave();else if(null!=f)f({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};
DrawioFile.prototype.saveAs=function(a,b,f){};DrawioFile.prototype.saveFile=function(a,b,f,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};
@@ -2698,8 +2718,8 @@ DrawioFile.prototype.handleConflictError=function(a,b){var f=mxUtils.bind(this,f
function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,f,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,d,k):this.invalidChecksum?this.showRefreshDialog(f,d,this.getErrorMessage(a)):b?this.showConflictDialog(k,n):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(f,
d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};
DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null==this.autosaveThread&&this.handleFileSuccess(!0)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus()};
-DrawioFile.prototype.fileSaved=function(a,b,f,d){try{this.stats.fileSaved++,this.invalidChecksum=this.inConflictState=!1,this.checkPages(this.ui.pages,"fileSaved"),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=f&&f()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,f,d)}catch(k){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(k);try{this.sendErrorReport("Error in fileSaved","SavedData:\n"+this.compressReportData(this.ui.anonymizeString(a),
-5E3),k)}catch(n){}}};
+DrawioFile.prototype.fileSaved=function(a,b,f,d){try{this.stats.fileSaved++,this.invalidChecksum=this.inConflictState=!1,this.checkPages(this.ui.pages,"fileSaved"),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=f&&f()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,f,d)}catch(k){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(k);try{this.sendErrorReport("Error in fileSaved","Saved Data:\n"+this.compressReportData(this.ui.anonymizeString(a),
+null,500),k)}catch(n){}}};
DrawioFile.prototype.autosave=function(a,b,f,d){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=
f&&f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -2740,7 +2760,7 @@ c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.get
else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var g=new mxCodec(d.ownerDocument);g.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&
!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,
arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=
-c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(F){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var g=0;g<b.length;g++)if("mxgraph"==b[g].getAttribute("class")){d.push(b[g]);
+c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(G){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var g=0;g<b.length;g++)if("mxgraph"==b[g].getAttribute("class")){d.push(b[g]);
break}0<d.length&&(b=d[0].getAttribute("data-mxgraph"),null!=b?(d=JSON.parse(b),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(b=mxUtils.getTextContent(d[0]),b=this.graph.decompress(b),0<b.length&&(d=mxUtils.parseXml(b),a=d.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&
(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(d=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=d&&(b=this.graph.decompress(mxUtils.getTextContent(d)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||
(a=null);return a};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
@@ -2749,12 +2769,12 @@ a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};window.Mat
MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
c){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var g=document.createElement("script");g.type="text/javascript";g.src=a;d[0].parentNode.appendChild(g)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,d,g){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==g&&c.push(g);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var n=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){n.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var q=Format.prototype.init;Format.prototype.init=function(){q.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
+var n=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){n.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
this.update)};var r=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?r.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var u=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
function(a){a=u.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;b.model.execute(d)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});
Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));a.appendChild(d)}return a};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;if(d.isEnabled()){var g=b.getCurrentFile();null!=g&&g.isAutosaveOptional()&&(g=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},
{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(g))}if(this.isMathOptionVisible()&&d.isEnabled()&&"undefined"!==typeof MathJax){g=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return d.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(d.mathEnabled)};b.addListener("mathEnabledChanged",
-this.listener)},destroy:function(){b.removeListener(this.listener)}});g.style.paddingTop="5px";a.appendChild(g);var h=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");h.style.position="relative";h.style.marginLeft="6px";h.style.top="2px";g.appendChild(h)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
+this.listener)},destroy:function(){b.removeListener(this.listener)}});g.style.paddingTop="5px";a.appendChild(g);var f=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");f.style.position="relative";f.style.marginLeft="6px";f.style.top="2px";g.appendChild(f)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",
type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,
@@ -2775,33 +2795,33 @@ defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,m
stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",
font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[null,{fill:mxConstants.NONE,stroke:"#36393d"},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",
gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",
-stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var d=function(a){if(null!=a)if(b)for(var d=0;d<a.length;d++)c[a[d].name]=a[d];else for(var g in c){for(var h=!1,d=0;d<a.length;d++)if(a[d].name==g&&a[d].type==c[g].type){h=!0;break}h||delete c[g]}},g=this.editorUi.editor.graph.view.getState(a);null!=g&&null!=g.shape&&(g.shape.commonCustomPropAdded||(g.shape.commonCustomPropAdded=!0,g.shape.customProperties=
-g.shape.customProperties||[],g.cell.vertex?Array.prototype.push.apply(g.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(g.shape.customProperties,Editor.commonEdgeProperties)),d(g.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(E){}}};var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
-g.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,d=a.edges,h=0;h<b.length;h++)this.findCommonProperties(b[h],c,0==h);for(h=0;h<d.length;h++)this.findCommonProperties(d[h],c,0==b.length&&0==h);0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var h=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,
+stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var d=function(a){if(null!=a)if(b)for(var d=0;d<a.length;d++)c[a[d].name]=a[d];else for(var g in c){for(var f=!1,d=0;d<a.length;d++)if(a[d].name==g&&a[d].type==c[g].type){f=!0;break}f||delete c[g]}},g=this.editorUi.editor.graph.view.getState(a);null!=g&&null!=g.shape&&(g.shape.commonCustomPropAdded||(g.shape.commonCustomPropAdded=!0,g.shape.customProperties=
+g.shape.customProperties||[],g.cell.vertex?Array.prototype.push.apply(g.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(g.shape.customProperties,Editor.commonEdgeProperties)),d(g.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(F){}}};var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
+g.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,d=a.edges,f=0;f<b.length;f++)this.findCommonProperties(b[f],c,0==f);for(f=0;f<d.length;f++)this.findCommonProperties(d[f],c,0==b.length&&0==f);0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var h=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");
-c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,c,b,d){w.getModel().beginUpdate();try{var g=[],h=[];if(null!=b.index){for(var f=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)f.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<f.length?null!=d?f.splice(d,1):f[b.index]=c:f.push(c);null!=b.size&&f.length>
-b.size&&(f=f.slice(0,b.size));c=f.join(",");null!=b.countProperty&&(w.setCellStyles(b.countProperty,f.length,w.getSelectionCells()),g.push(b.countProperty),h.push(f.length))}w.setCellStyles(a,c,w.getSelectionCells());g.push(a);h.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var m=b.dependentPropsDefVal[a],p=b.dependentPropsVals[a];if(p.length>c)p=p.slice(0,c);else for(var v=p.length;v<c;v++)p.push(m);p=p.join(",");w.setCellStyles(b.dependentProps[a],p,w.getSelectionCells());
-g.push(b.dependentProps[a]);h.push(p)}t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",g,"values",h,"cells",w.getSelectionCells()))}finally{w.getModel().endUpdate()}}function g(c,b,d){var g=mxUtils.getOffset(a,!0),h=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=h.x-g.x+"px";b.style.top=h.y-g.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function h(a,c,b){var g=document.createElement("div");g.style.width="32px";g.style.height=
-"4px";g.style.margin="2px";g.style.border="1px solid black";g.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(h){this.editorUi.pickColor(c,function(c){g.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(h)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(g);return btn}function f(a,c,b,g,h,f,l){null!=c&&(c=c.split(","),v.push({name:a,
-values:c,type:b,defVal:g,countProperty:h,parentRow:f,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var m=f,t=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==a)m=m.nextSibling,t++;else break;var w={type:b,parentRow:f,index:t,isDeletable:!0,defVal:g,countProperty:h},t=p(a,"",w,0==t%2,l);d(a,g,w);m.parentNode.insertBefore(t,m.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function l(a,c,b,d,g,h,f){if(0<g){var l=Array(g);c=null!=c?c.split(","):[];for(var m=0;m<g;m++)l[m]=null!=c[m]?c[m]:null!=d?d:"";v.push({name:a,values:l,type:b,defVal:d,parentRow:h,flipBkg:f,size:g})}return document.createElement("div")}function m(a,c,b){var g=document.createElement("input");g.type="checkbox";g.checked="1"==c;mxEvent.addListener(g,"change",function(){d(a,g.checked?"1":"0",b)});return g}function p(c,b,p,w,v){var k=p.dispName,x=p.type,n=document.createElement("tr");n.className="gePropRow"+
-(v?"Dark":"")+(w?"Alt":"")+" gePropNonHeaderRow";n.setAttribute("data-pName",c);n.setAttribute("data-pValue",b);w=!1;null!=p.index&&(n.setAttribute("data-index",p.index),k=(null!=k?k:"")+"["+p.index+"]",w=!0);var y=document.createElement("td");y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(k,null,k));w&&(y.style.textAlign="right");n.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(h(c,b,p));else if("bool"==x||"boolean"==
-x)y.appendChild(m(c,b,p));else if("enum"==x){var z=p.enumList;for(v=0;v<z.length;v++)if(k=z[v],k.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(t,function(){var h=document.createElement("select");g(y,h);for(var f=0;f<z.length;f++){var l=z[f],m=document.createElement("option");m.value=mxUtils.htmlEntities(l.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));h.appendChild(m)}h.value=
-b;a.appendChild(h);mxEvent.addListener(h,"change",function(){var a=mxUtils.htmlEntities(h.value);d(c,a,p)});h.focus();mxEvent.addListener(h,"blur",function(){a.removeChild(h)})}))}else"dynamicArr"==x?y.appendChild(f(c,b,p.subType,p.subDefVal,p.countProperty,n,v)):"staticArr"==x?y.appendChild(l(c,b,p.subType,p.subDefVal,p.size,n,v)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(t,function(){function h(){var a=f.value,a=0==a.length&&"string"!=x?0:a;p.allowAuto&&("auto"==a.trim().toLowerCase()?
-(a="auto",x="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==x?parseInt(a):a)+"");d(c,a,p)}var f=document.createElement("input");g(y,f,!0);f.value=b;f.className="gePropEditor";"int"!=x&&"float"!=x||p.allowAuto||(f.type="number",f.step="int"==x?"1":"any",null!=p.min&&(f.min=parseFloat(p.min)),null!=p.max&&(f.max=parseFloat(p.max)));a.appendChild(f);mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&h()});
-f.focus();mxEvent.addListener(f,"blur",function(){h()})})));p.isDeletable&&(v=mxUtils.button("-",mxUtils.bind(t,function(a){d(c,"",p,p.index);mxEvent.consume(a)})),v.style.height="16px",v.style.width="25px",v.style["float"]="right",v.className="geColorBtn",y.appendChild(v));n.appendChild(y);return n}var t=this,w=this.editorUi.editor.graph,v=[];a.style.position="relative";a.style.padding="0";var k=document.createElement("table");k.style.whiteSpace="nowrap";k.style.width="100%";var x=document.createElement("tr");
-x.className="gePropHeader";var n=document.createElement("th");n.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;n.appendChild(y);mxUtils.write(n,mxResources.get("property"));x.style.cursor="pointer";var A=function(){var c=k.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var g=a.childNodes[d],h=g.nodeName.toUpperCase();"INPUT"!=
-h&&"SELECT"!=h||a.removeChild(g)}catch(ba){}}else y.src=Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(x,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;A()});x.appendChild(n);n=document.createElement("th");n.className="gePropHeaderCell";n.innerHTML=mxResources.get("value");x.appendChild(n);k.appendChild(x);var q=!1,D=!1,r;for(r in c)if(x=c[r],"function"!=typeof x.isVisible||x.isVisible(b)){var u=null!=b.style[r]?
-mxUtils.htmlEntities(b.style[r]+""):x.defVal;if("separator"==x.type)D=!D;else{if("staticArr"==x.type)x.size=parseInt(b.style[x.sizeProperty]||c[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var T=x.dependentProps,K=[],O=[],n=0;n<T.length;n++){var S=b.style[T[n]];O.push(c[T[n]].subDefVal);K.push(null!=S?S.split(","):[])}x.dependentPropsDefVal=O;x.dependentPropsVals=K}k.appendChild(p(r,u,x,q,D));q=!q}}for(n=0;n<v.length;n++)for(x=v[n],c=x.parentRow,b=0;b<x.values.length;b++)r=p(x.name,
-x.values[b],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:b,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==b%2,x.flipBkg),c.parentNode.insertBefore(r,c.nextSibling),c=r;a.appendChild(k);A();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(c=0;c<b.length;c++){for(var g=d.getModel().getStyle(b[c]),f=0;f<h.length;f++)g=mxUtils.removeStylename(g,
-h[f]);var l=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,null)),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,
+c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,c,b,d){w.getModel().beginUpdate();try{var g=[],f=[];if(null!=b.index){for(var h=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)h.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<h.length?null!=d?h.splice(d,1):h[b.index]=c:h.push(c);null!=b.size&&h.length>
+b.size&&(h=h.slice(0,b.size));c=h.join(",");null!=b.countProperty&&(w.setCellStyles(b.countProperty,h.length,w.getSelectionCells()),g.push(b.countProperty),f.push(h.length))}w.setCellStyles(a,c,w.getSelectionCells());g.push(a);f.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var m=b.dependentPropsDefVal[a],q=b.dependentPropsVals[a];if(q.length>c)q=q.slice(0,c);else for(var v=q.length;v<c;v++)q.push(m);q=q.join(",");w.setCellStyles(b.dependentProps[a],q,w.getSelectionCells());
+g.push(b.dependentProps[a]);f.push(q)}t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",g,"values",f,"cells",w.getSelectionCells()))}finally{w.getModel().endUpdate()}}function g(c,b,d){var g=mxUtils.getOffset(a,!0),f=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=f.x-g.x+"px";b.style.top=f.y-g.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function f(a,c,b){var g=document.createElement("div");g.style.width="32px";g.style.height=
+"4px";g.style.margin="2px";g.style.border="1px solid black";g.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(f){this.editorUi.pickColor(c,function(c){g.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(f)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(g);return btn}function h(a,c,b,g,f,h,l){null!=c&&(c=c.split(","),v.push({name:a,
+values:c,type:b,defVal:g,countProperty:f,parentRow:h,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var m=h,t=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==a)m=m.nextSibling,t++;else break;var w={type:b,parentRow:h,index:t,isDeletable:!0,defVal:g,countProperty:f},t=q(a,"",w,0==t%2,l);d(a,g,w);m.parentNode.insertBefore(t,m.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function l(a,c,b,d,g,f,h){if(0<g){var l=Array(g);c=null!=c?c.split(","):[];for(var m=0;m<g;m++)l[m]=null!=c[m]?c[m]:null!=d?d:"";v.push({name:a,values:l,type:b,defVal:d,parentRow:f,flipBkg:h,size:g})}return document.createElement("div")}function m(a,c,b){var g=document.createElement("input");g.type="checkbox";g.checked="1"==c;mxEvent.addListener(g,"change",function(){d(a,g.checked?"1":"0",b)});return g}function q(c,b,q,w,v){var k=q.dispName,x=q.type,n=document.createElement("tr");n.className="gePropRow"+
+(v?"Dark":"")+(w?"Alt":"")+" gePropNonHeaderRow";n.setAttribute("data-pName",c);n.setAttribute("data-pValue",b);w=!1;null!=q.index&&(n.setAttribute("data-index",q.index),k=(null!=k?k:"")+"["+q.index+"]",w=!0);var y=document.createElement("td");y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(k,null,k));w&&(y.style.textAlign="right");n.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(f(c,b,q));else if("bool"==x||"boolean"==
+x)y.appendChild(m(c,b,q));else if("enum"==x){var z=q.enumList;for(v=0;v<z.length;v++)if(k=z[v],k.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(t,function(){var f=document.createElement("select");g(y,f);for(var h=0;h<z.length;h++){var l=z[h],m=document.createElement("option");m.value=mxUtils.htmlEntities(l.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(m)}f.value=
+b;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);d(c,a,q)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==x?y.appendChild(h(c,b,q.subType,q.subDefVal,q.countProperty,n,v)):"staticArr"==x?y.appendChild(l(c,b,q.subType,q.subDefVal,q.size,n,v)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(t,function(){function f(){var a=h.value,a=0==a.length&&"string"!=x?0:a;q.allowAuto&&("auto"==a.trim().toLowerCase()?
+(a="auto",x="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==x?parseInt(a):a)+"");d(c,a,q)}var h=document.createElement("input");g(y,h,!0);h.value=b;h.className="gePropEditor";"int"!=x&&"float"!=x||q.allowAuto||(h.type="number",h.step="int"==x?"1":"any",null!=q.min&&(h.min=parseFloat(q.min)),null!=q.max&&(h.max=parseFloat(q.max)));a.appendChild(h);mxEvent.addListener(h,"keypress",function(a){13==a.keyCode&&f()});
+h.focus();mxEvent.addListener(h,"blur",function(){f()})})));q.isDeletable&&(v=mxUtils.button("-",mxUtils.bind(t,function(a){d(c,"",q,q.index);mxEvent.consume(a)})),v.style.height="16px",v.style.width="25px",v.style["float"]="right",v.className="geColorBtn",y.appendChild(v));n.appendChild(y);return n}var t=this,w=this.editorUi.editor.graph,v=[];a.style.position="relative";a.style.padding="0";var k=document.createElement("table");k.style.whiteSpace="nowrap";k.style.width="100%";var x=document.createElement("tr");
+x.className="gePropHeader";var n=document.createElement("th");n.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;n.appendChild(y);mxUtils.write(n,mxResources.get("property"));x.style.cursor="pointer";var A=function(){var c=k.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var g=a.childNodes[d],f=g.nodeName.toUpperCase();"INPUT"!=
+f&&"SELECT"!=f||a.removeChild(g)}catch(ca){}}else y.src=Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(x,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;A()});x.appendChild(n);n=document.createElement("th");n.className="gePropHeaderCell";n.innerHTML=mxResources.get("value");x.appendChild(n);k.appendChild(x);var p=!1,E=!1,r;for(r in c)if(x=c[r],"function"!=typeof x.isVisible||x.isVisible(b)){var u=null!=b.style[r]?
+mxUtils.htmlEntities(b.style[r]+""):x.defVal;if("separator"==x.type)E=!E;else{if("staticArr"==x.type)x.size=parseInt(b.style[x.sizeProperty]||c[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var U=x.dependentProps,L=[],P=[],n=0;n<U.length;n++){var R=b.style[U[n]];P.push(c[U[n]].subDefVal);L.push(null!=R?R.split(","):[])}x.dependentPropsDefVal=P;x.dependentPropsVals=L}k.appendChild(q(r,u,x,p,E));p=!p}}for(n=0;n<v.length;n++)for(x=v[n],c=x.parentRow,b=0;b<x.values.length;b++)r=q(x.name,
+x.values[b],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:b,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==b%2,x.flipBkg),c.parentNode.insertBefore(r,c.nextSibling),c=r;a.appendChild(k);A();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(c=0;c<b.length;c++){for(var g=d.getModel().getStyle(b[c]),h=0;h<f.length;h++)g=mxUtils.removeStylename(g,
+f[h]);var l=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,null)),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,
a.font||mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null)))):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,"#ffffff")),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,"#000000")),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,
null))));d.getModel().setStyle(b[c],g)}}finally{d.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?
-c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=a.fill||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),c.style.border="1px solid "+(a.stroke||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000"));else{var b=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+
-f}g.appendChild(c)}g.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(g),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.paddingLeft="24px";g.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);
-var h="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var f=document.createElement("div");f.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(f),a.appendChild(l));mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(f);b(l);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=a.fill||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),c.style.border="1px solid "+(a.stroke||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000"));else{var b=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),h=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+
+h}g.appendChild(c)}g.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(g),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.paddingLeft="24px";g.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);
+var f="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var h=document.createElement("div");h.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(h),a.appendChild(l));mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(h);b(l);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var d=this.editorUi.editor.graph,g=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
@@ -2809,19 +2829,19 @@ function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("ti
this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if(null!=c){if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}if("undefined"!=typeof mxTableLayout&&"tableLayout"==c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),
b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return d.apply(this,arguments)}};
-var p=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return p.apply(this,arguments)&&!mxClient.IS_SF};var m=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=m.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}null!=this.globalUrlVars&&(c=
-this.globalUrlVars[a])}return c};var t=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){t.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+var t=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return t.apply(this,arguments)&&!mxClient.IS_SF};var m=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=m.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}null!=this.globalUrlVars&&(c=
+this.globalUrlVars[a])}return c};var q=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){q.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var x=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=
function(){x.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<a.actions.length;c++)if(null!=a.actions[c].open)if(this.isCustomLink(a.actions[c].open)){if(!this.customLinkClicked(a.actions[c].open))return}else this.openLink(a.actions[c].open);this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)this.handleLinkAction(a.actions[c])}finally{this.model.endUpdate()}}};
Graph.prototype.handleLinkAction=function(a){var c=[];null!=a.select&&this.isEnabled()&&(c=this.getCellsForAction(a.select),this.setSelectionCells(c));null!=a.highlight&&(c=this.getCellsForAction(a.highlight),this.highlightCells(c,a.highlight.color,a.highlight.duration,a.highlight.opacity));null!=a.toggle&&this.toggleCells(this.getCellsForAction(a.toggle));null!=a.show&&this.setCellsVisible(this.getCellsForAction(a.show),!0);null!=a.hide&&this.setCellsVisible(this.getCellsForAction(a.hide),!1);null!=
a.scroll&&(c=this.getCellsForAction(a.scroll));0<c.length&&this.scrollCellToVisible(c[0])};Graph.prototype.getCellsForAction=function(a){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var d=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=d},d));else{var g=this.model.getCell(a[b]);null!=g&&c.push(g)}return c};Graph.prototype.getCellsForTags=
-function(a,c,b){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var g=0;g<c.length;g++)if(this.model.isVertex(c[g])||this.model.isEdge(c[g])){var h=null!=c[g].value&&"object"==typeof c[g].value?mxUtils.trim(c[g].value.getAttribute(b)||""):"",f=!0;if(0<h.length)for(var h=h.toLowerCase().split(" "),l=0;l<a.length&&f;l++)var m=mxUtils.trim(a[l]).toLowerCase(),f=f&&(0==m.length||0<=mxUtils.indexOf(h,m));else f=0==a.length;f&&d.push(c[g])}}return d};
+function(a,c,b){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var g=0;g<c.length;g++)if(this.model.isVertex(c[g])||this.model.isEdge(c[g])){var f=null!=c[g].value&&"object"==typeof c[g].value?mxUtils.trim(c[g].value.getAttribute(b)||""):"",h=!0;if(0<f.length)for(var f=f.toLowerCase().split(" "),l=0;l<a.length&&h;l++)var m=mxUtils.trim(a[l]).toLowerCase(),h=h&&(0==m.length||0<=mxUtils.indexOf(f,m));else h=0==a.length;h&&d.push(c[g])}}return d};
Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,d){for(var g=0;g<a.length;g++)this.highlightCell(a[g],c,b,d)};Graph.prototype.highlightCell=function(a,c,
-b,d){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var g=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),h=new mxCellHighlight(this,c,g,!1);null!=d&&(h.opacity=d);h.highlight(a);window.setTimeout(function(){null!=h.shape&&(mxUtils.setPrefixedStyle(h.shape.node.style,"transition","all 1200ms ease-in-out"),h.shape.node.style.opacity=0);window.setTimeout(function(){h.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,
-c,b){b=null!=b?b:!1;var d=a.ownerDocument,g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");g.setAttribute("id",this.shadowId);var h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");h.setAttribute("in","SourceAlpha");h.setAttribute("stdDeviation",this.svgShadowBlur);h.setAttribute("result","blur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):
-d.createElement("feOffset");h.setAttribute("in","blur");h.setAttribute("dx",this.svgShadowSize);h.setAttribute("dy",this.svgShadowSize);h.setAttribute("result","offsetBlur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");h.setAttribute("flood-color",this.svgShadowColor);h.setAttribute("flood-opacity",this.svgShadowOpacity);h.setAttribute("result","offsetColor");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
-"feComposite"):d.createElement("feComposite");h.setAttribute("in","offsetColor");h.setAttribute("in2","offsetBlur");h.setAttribute("operator","in");h.setAttribute("result","offsetBlur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");h.setAttribute("in","SourceGraphic");h.setAttribute("in2","offsetBlur");g.appendChild(h);h=a.getElementsByTagName("defs");0==h.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
-"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=h[0];d.appendChild(g);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+b,d){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var g=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,c,g,!1);null!=d&&(f.opacity=d);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,
+c,b){b=null!=b?b:!1;var d=a.ownerDocument,g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");g.setAttribute("id",this.shadowId);var f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");f.setAttribute("in","SourceAlpha");f.setAttribute("stdDeviation",this.svgShadowBlur);f.setAttribute("result","blur");g.appendChild(f);f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):
+d.createElement("feOffset");f.setAttribute("in","blur");f.setAttribute("dx",this.svgShadowSize);f.setAttribute("dy",this.svgShadowSize);f.setAttribute("result","offsetBlur");g.appendChild(f);f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");f.setAttribute("flood-color",this.svgShadowColor);f.setAttribute("flood-opacity",this.svgShadowOpacity);f.setAttribute("result","offsetColor");g.appendChild(f);f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
+"feComposite"):d.createElement("feComposite");f.setAttribute("in","offsetColor");f.setAttribute("in2","offsetBlur");f.setAttribute("operator","in");f.setAttribute("result","offsetBlur");g.appendChild(f);f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");f.setAttribute("in","SourceGraphic");f.setAttribute("in2","offsetBlur");g.appendChild(f);f=a.getElementsByTagName("defs");0==f.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
+"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=f[0];d.appendChild(g);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];
mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=
[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=
@@ -2831,50 +2851,50 @@ mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarku
mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];
mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",
STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,
-5)&&(c="mxgraph.sysml"));return c};var w=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,g,h,f,l,m,p){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return w.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){x.value=Math.max(1,Math.min(l,Math.max(parseInt(x.value),parseInt(k.value))));k.value=Math.max(1,Math.min(l,Math.min(parseInt(x.value),parseInt(k.value))))}function d(c){function b(c,b,g){var h=
-c.getGraphBounds(),f=0,l=0,m=W.get(),p=1/c.pageScale,t=y.checked;if(t)var p=parseInt(C.value),w=parseInt(da.value),p=Math.min(m.height*w/(h.height/c.view.scale),m.width*p/(h.width/c.view.scale));else p=parseInt(q.value)/(100*c.pageScale),isNaN(p)&&(d=1/c.pageScale,q.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*d);m.height=Math.ceil(m.height*d);p*=d;!t&&c.pageVisible?(h=c.getPageLayout(),f-=h.x*m.width,l-=h.y*m.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,
-p,m,0,f,l,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var k=b.writeHead;b.writeHead=function(c){k.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var x=b.renderPage;b.renderPage=function(a,c,b,d,g,h){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var l=x.apply(this,
-arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}b.open(null,null,g,!0)}else{m=c.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=t;b.appendGraph(c,p,f,l,g,!0)}return b}var d=parseInt(Y.value)/100;isNaN(d)&&(d=1,Y.value="100 %");var d=.75*d,h=k.value,f=x.value,l=!t.checked,p=null;l&&(l=h==m&&f==m);if(!l&&null!=a.pages&&a.pages.length){var w=0,l=a.pages.length-1;t.checked||
-(w=parseInt(h)-1,l=parseInt(f)-1);for(var v=w;v<=l;v++){var n=a.pages[v],h=n==a.currentPage?g:null;if(null==h){var h=a.createTemporaryGraph(g.getStylesheet()),f=!0,w=!1,z=null,A=null;null==n.viewState&&null==n.root&&a.updatePageRoot(n);null!=n.viewState&&(f=n.viewState.pageVisible,w=n.viewState.mathEnabled,z=n.viewState.background,A=n.viewState.backgroundImage);h.background=z;h.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;h.pageVisible=f;h.mathEnabled=w;var D=h.getGlobalVariable;
-h.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?v+1:D.apply(this,arguments)};document.body.appendChild(h.container);a.updatePageRoot(n);h.model.setRoot(n.root)}p=b(h,p,v!=l);h!=g&&h.container.parentNode.removeChild(h.container)}}else p=b(g);p.mathEnabled&&(l=p.wnd.document,l.writeln('<script type="text/x-mathjax-config">'),l.writeln("MathJax.Hub.Config({"),l.writeln("showMathMenu: false,"),l.writeln('messageStyle: "none",'),l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
+5)&&(c="mxgraph.sysml"));return c};var w=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,g,f,h,l,m,q){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return w.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){x.value=Math.max(1,Math.min(l,Math.max(parseInt(x.value),parseInt(k.value))));k.value=Math.max(1,Math.min(l,Math.min(parseInt(x.value),parseInt(k.value))))}function d(c){function b(c,b,g){var f=
+c.getGraphBounds(),h=0,l=0,m=X.get(),q=1/c.pageScale,t=y.checked;if(t)var q=parseInt(D.value),w=parseInt(ea.value),q=Math.min(m.height*w/(f.height/c.view.scale),m.width*q/(f.width/c.view.scale));else q=parseInt(p.value)/(100*c.pageScale),isNaN(q)&&(d=1/c.pageScale,p.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*d);m.height=Math.ceil(m.height*d);q*=d;!t&&c.pageVisible?(f=c.getPageLayout(),h-=f.x*m.width,l-=f.y*m.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,
+q,m,0,h,l,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var k=b.writeHead;b.writeHead=function(c){k.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var x=b.renderPage;b.renderPage=function(a,c,b,d,g,f){var h=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var l=x.apply(this,
+arguments);mxClient.NO_FO=h;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}b.open(null,null,g,!0)}else{m=c.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=t;b.appendGraph(c,q,h,l,g,!0)}return b}var d=parseInt(Z.value)/100;isNaN(d)&&(d=1,Z.value="100 %");var d=.75*d,f=k.value,h=x.value,l=!t.checked,q=null;l&&(l=f==m&&h==m);if(!l&&null!=a.pages&&a.pages.length){var w=0,l=a.pages.length-1;t.checked||
+(w=parseInt(f)-1,l=parseInt(h)-1);for(var v=w;v<=l;v++){var n=a.pages[v],f=n==a.currentPage?g:null;if(null==f){var f=a.createTemporaryGraph(g.getStylesheet()),h=!0,w=!1,z=null,A=null;null==n.viewState&&null==n.root&&a.updatePageRoot(n);null!=n.viewState&&(h=n.viewState.pageVisible,w=n.viewState.mathEnabled,z=n.viewState.background,A=n.viewState.backgroundImage);f.background=z;f.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;f.pageVisible=h;f.mathEnabled=w;var E=f.getGlobalVariable;
+f.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?v+1:E.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(n);f.model.setRoot(n.root)}q=b(f,q,v!=l);f!=g&&f.container.parentNode.removeChild(f.container)}}else q=b(g);q.mathEnabled&&(l=q.wnd.document,l.writeln('<script type="text/x-mathjax-config">'),l.writeln("MathJax.Hub.Config({"),l.writeln("showMathMenu: false,"),l.writeln('messageStyle: "none",'),l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
l.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),l.writeln('"HTML-CSS": {'),l.writeln("imageFont: null"),l.writeln("},"),l.writeln("TeX: {"),l.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),l.writeln("},"),l.writeln("tex2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("},"),l.writeln("asciimath2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("}"),l.writeln("});"),c&&(l.writeln("MathJax.Hub.Queue(function () {"),
-l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script>"),l.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));p.closeDocument();!p.mathEnabled&&c&&PrintDialog.printPreview(p)}var g=a.editor.graph,h=document.createElement("div"),f=document.createElement("h3");f.style.width="100%";f.style.textAlign="center";f.style.marginTop="0px";mxUtils.write(f,c||mxResources.get("print"));h.appendChild(f);var l=1,m=1,p=document.createElement("div");
-p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);f=document.createElement("span");mxUtils.write(f,mxResources.get("printAllPages"));p.appendChild(f);mxUtils.br(p);var w=t.cloneNode(!0);t.setAttribute("checked","checked");w.setAttribute("value","range");
-p.appendChild(w);f=document.createElement("span");mxUtils.write(f,mxResources.get("pages")+":");p.appendChild(f);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";p.appendChild(k);f=document.createElement("span");mxUtils.write(f,mxResources.get("to"));p.appendChild(f);var x=k.cloneNode(!0);p.appendChild(x);mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(x,
-"focus",function(){w.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(x,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(f=0;f<a.pages.length;f++)if(a.currentPage==a.pages[f]){m=f+1;k.value=m;x.value=m;break}k.setAttribute("max",l);x.setAttribute("max",l);1<l&&h.appendChild(p);var v=document.createElement("div");v.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type",
-"radio");n.setAttribute("name","printZoom");v.appendChild(n);f=document.createElement("span");mxUtils.write(f,mxResources.get("adjustTo"));v.appendChild(f);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";v.appendChild(q);mxEvent.addListener(q,"focus",function(){n.checked=!0});h.appendChild(v);var p=p.cloneNode(!1),y=n.cloneNode(!0);y.setAttribute("value","fit");n.setAttribute("checked","checked");f=document.createElement("div");
-f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(y);p.appendChild(f);v=document.createElement("table");v.style.display="inline-block";var D=document.createElement("tbody"),r=document.createElement("tr"),u=r.cloneNode(!0),G=document.createElement("td"),T=G.cloneNode(!0),K=G.cloneNode(!0),O=G.cloneNode(!0),S=G.cloneNode(!0),ja=G.cloneNode(!0);G.style.textAlign="right";O.style.textAlign="right";mxUtils.write(G,mxResources.get("fitTo"));var C=document.createElement("input");
-C.style.cssText="margin:0 8px 0 8px;";C.setAttribute("value","1");C.setAttribute("min","1");C.setAttribute("type","number");C.style.width="40px";T.appendChild(C);f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsAcross"));K.appendChild(f);mxUtils.write(O,mxResources.get("fitToBy"));var da=C.cloneNode(!0);S.appendChild(da);mxEvent.addListener(C,"focus",function(){y.checked=!0});mxEvent.addListener(da,"focus",function(){y.checked=!0});f=document.createElement("span");mxUtils.write(f,
-mxResources.get("fitToSheetsDown"));ja.appendChild(f);r.appendChild(G);r.appendChild(T);r.appendChild(K);u.appendChild(O);u.appendChild(S);u.appendChild(ja);D.appendChild(r);D.appendChild(u);v.appendChild(D);p.appendChild(v);h.appendChild(p);p=document.createElement("div");f=document.createElement("div");f.style.fontWeight="bold";f.style.marginBottom="12px";mxUtils.write(f,mxResources.get("paperSize"));p.appendChild(f);f=document.createElement("div");f.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(f,
-"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(f);f=document.createElement("span");mxUtils.write(f,mxResources.get("pageScale"));p.appendChild(f);var Y=document.createElement("input");Y.style.cssText="margin:0 8px 0 8px;";Y.setAttribute("value","100 %");Y.style.width="60px";p.appendChild(Y);h.appendChild(p);f=document.createElement("div");f.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-p.className="geBtn";a.editor.cancelFirst&&f.appendChild(p);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){g.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",f.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),v.className="geBtn",f.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});v.className=
-"geBtn gePrimaryBtn";f.appendChild(v);a.editor.cancelFirst||f.appendChild(p);h.appendChild(f);this.container=h};var D=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=
-this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(D.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
-var ErrorDialog=function(a,b,f,d,k,n,q,r,u,c,g){u=null!=u?u:!0;var h=document.createElement("div");h.style.textAlign="center";if(null!=b){var l=document.createElement("div");l.style.padding="0px";l.style.margin="0px";l.style.fontSize="18px";l.style.paddingBottom="16px";l.style.marginBottom="16px";l.style.borderBottom="1px solid #c0c0c0";l.style.color="gray";l.style.whiteSpace="nowrap";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,b);l.setAttribute("title",b);h.appendChild(l)}b=
-document.createElement("div");b.style.padding="6px";b.innerHTML=f;h.appendChild(b);f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";null!=n&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();n()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=g&&g()}),c.className="geBtn",f.appendChild(c));var p=mxUtils.button(d,function(){u&&a.hideDialog();null!=k&&k()});p.className="geBtn";f.appendChild(p);
-null!=q&&(d=mxUtils.button(q,function(){u&&a.hideDialog();null!=r&&r()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){p.focus()};h.appendChild(f);this.container=h};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,d,f,p){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,d,f,p);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
+l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script>"),l.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));q.closeDocument();!q.mathEnabled&&c&&PrintDialog.printPreview(q)}var g=a.editor.graph,f=document.createElement("div"),h=document.createElement("h3");h.style.width="100%";h.style.textAlign="center";h.style.marginTop="0px";mxUtils.write(h,c||mxResources.get("print"));f.appendChild(h);var l=1,m=1,q=document.createElement("div");
+q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");q.appendChild(t);h=document.createElement("span");mxUtils.write(h,mxResources.get("printAllPages"));q.appendChild(h);mxUtils.br(q);var w=t.cloneNode(!0);t.setAttribute("checked","checked");w.setAttribute("value","range");
+q.appendChild(w);h=document.createElement("span");mxUtils.write(h,mxResources.get("pages")+":");q.appendChild(h);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";q.appendChild(k);h=document.createElement("span");mxUtils.write(h,mxResources.get("to"));q.appendChild(h);var x=k.cloneNode(!0);q.appendChild(x);mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(x,
+"focus",function(){w.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(x,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(h=0;h<a.pages.length;h++)if(a.currentPage==a.pages[h]){m=h+1;k.value=m;x.value=m;break}k.setAttribute("max",l);x.setAttribute("max",l);1<l&&f.appendChild(q);var v=document.createElement("div");v.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type",
+"radio");n.setAttribute("name","printZoom");v.appendChild(n);h=document.createElement("span");mxUtils.write(h,mxResources.get("adjustTo"));v.appendChild(h);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";v.appendChild(p);mxEvent.addListener(p,"focus",function(){n.checked=!0});f.appendChild(v);var q=q.cloneNode(!1),y=n.cloneNode(!0);y.setAttribute("value","fit");n.setAttribute("checked","checked");h=document.createElement("div");
+h.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";h.appendChild(y);q.appendChild(h);v=document.createElement("table");v.style.display="inline-block";var E=document.createElement("tbody"),r=document.createElement("tr"),u=r.cloneNode(!0),H=document.createElement("td"),U=H.cloneNode(!0),L=H.cloneNode(!0),P=H.cloneNode(!0),R=H.cloneNode(!0),ja=H.cloneNode(!0);H.style.textAlign="right";P.style.textAlign="right";mxUtils.write(H,mxResources.get("fitTo"));var D=document.createElement("input");
+D.style.cssText="margin:0 8px 0 8px;";D.setAttribute("value","1");D.setAttribute("min","1");D.setAttribute("type","number");D.style.width="40px";U.appendChild(D);h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsAcross"));L.appendChild(h);mxUtils.write(P,mxResources.get("fitToBy"));var ea=D.cloneNode(!0);R.appendChild(ea);mxEvent.addListener(D,"focus",function(){y.checked=!0});mxEvent.addListener(ea,"focus",function(){y.checked=!0});h=document.createElement("span");mxUtils.write(h,
+mxResources.get("fitToSheetsDown"));ja.appendChild(h);r.appendChild(H);r.appendChild(U);r.appendChild(L);u.appendChild(P);u.appendChild(R);u.appendChild(ja);E.appendChild(r);E.appendChild(u);v.appendChild(E);q.appendChild(v);f.appendChild(q);q=document.createElement("div");h=document.createElement("div");h.style.fontWeight="bold";h.style.marginBottom="12px";mxUtils.write(h,mxResources.get("paperSize"));q.appendChild(h);h=document.createElement("div");h.style.marginBottom="12px";var X=PageSetupDialog.addPageFormatPanel(h,
+"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(h);h=document.createElement("span");mxUtils.write(h,mxResources.get("pageScale"));q.appendChild(h);var Z=document.createElement("input");Z.style.cssText="margin:0 8px 0 8px;";Z.setAttribute("value","100 %");Z.style.width="60px";q.appendChild(Z);f.appendChild(q);h=document.createElement("div");h.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+q.className="geBtn";a.editor.cancelFirst&&h.appendChild(q);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){g.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",h.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),v.className="geBtn",h.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});v.className=
+"geBtn gePrimaryBtn";h.appendChild(v);a.editor.cancelFirst||h.appendChild(q);f.appendChild(h);this.container=f};var E=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=
+this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(E.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
+var ErrorDialog=function(a,b,f,d,k,n,p,r,u,c,g){u=null!=u?u:!0;var h=document.createElement("div");h.style.textAlign="center";if(null!=b){var l=document.createElement("div");l.style.padding="0px";l.style.margin="0px";l.style.fontSize="18px";l.style.paddingBottom="16px";l.style.marginBottom="16px";l.style.borderBottom="1px solid #c0c0c0";l.style.color="gray";l.style.whiteSpace="nowrap";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,b);l.setAttribute("title",b);h.appendChild(l)}b=
+document.createElement("div");b.style.padding="6px";b.innerHTML=f;h.appendChild(b);f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";null!=n&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();n()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=g&&g()}),c.className="geBtn",f.appendChild(c));var t=mxUtils.button(d,function(){u&&a.hideDialog();null!=k&&k()});t.className="geBtn";f.appendChild(t);
+null!=p&&(d=mxUtils.button(p,function(){u&&a.hideDialog();null!=r&&r()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){t.focus()};h.appendChild(f);this.container=h};
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,d,f,t){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,d,f,t);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/log?severity="+c+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
-":lnum:"+encodeURIComponent(d)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(x){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(h){}};EditorUi.sendReport=function(a,
+":lnum:"+encodeURIComponent(d)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}}catch(x){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(h){}};EditorUi.sendReport=function(a,
b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(h){}};EditorUi.debug=function(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
a)}};EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";
EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,
10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=
-!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");
-EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(m){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{b=document.createElement("canvas");b.width=b.height=1;var f=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=
-null!==f.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();
+!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");
+EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(m){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}try{b=document.createElement("canvas");b.width=b.height=1;var f=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=
+null!==f.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();
this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=
-d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=c.spin;c.spin=function(d,h){var f=!1;this.active||(g.call(this,d),this.active=!0,null!=h&&(f=document.createElement("div"),f.style.position="absolute",f.style.whiteSpace="nowrap",f.style.background="#4B4243",f.style.color="white",f.style.fontFamily="Helvetica, Arial",f.style.fontSize="9pt",f.style.padding="6px",
-f.style.paddingLeft="10px",f.style.paddingRight="10px",f.style.zIndex=2E9,f.style.left=Math.max(0,a)+"px",f.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(f.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=h.substring(h.length-3,h.length)&&(h+="..."),f.innerHTML=h,d.appendChild(f),c.status=f,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&
-(f.style.left=Math.round(Math.max(0,a-f.offsetWidth/2))+"px",f.style.top=Math.round(Math.max(0,b+70-f.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,h)}));this.stop();return a}),f=!0);return f};var h=c.stop;c.stop=function(){h.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,
-d){function c(a,c){var b=h;h+=c;return a.substring(b,h)}function g(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var h=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=g(a);var f=c(a,4);if(null!=b&&b(h-8,f,d))break;value=c(a,d);c(a,4);if("IEND"==f)break}while(d)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),
-b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(l){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var f=c.lastIndexOf("&lt;/mxfile&gt;");f>d&&(b=c.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var p=mxUtils.parseXml(c),
-m=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=m?mxUtils.getXml(m):""}catch(t){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=this.editor.graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
+d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=c.spin;c.spin=function(d,f){var h=!1;this.active||(g.call(this,d),this.active=!0,null!=f&&(h=document.createElement("div"),h.style.position="absolute",h.style.whiteSpace="nowrap",h.style.background="#4B4243",h.style.color="white",h.style.fontFamily="Helvetica, Arial",h.style.fontSize="9pt",h.style.padding="6px",
+h.style.paddingLeft="10px",h.style.paddingRight="10px",h.style.zIndex=2E9,h.style.left=Math.max(0,a)+"px",h.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(h.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(h.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=f.substring(f.length-3,f.length)&&(f+="..."),h.innerHTML=f,d.appendChild(h),c.status=h,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&
+(h.style.left=Math.round(Math.max(0,a-h.offsetWidth/2))+"px",h.style.top=Math.round(Math.max(0,b+70-h.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,f)}));this.stop();return a}),h=!0);return h};var f=c.stop;c.stop=function(){f.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,
+d){function c(a,c){var b=f;f+=c;return a.substring(b,f)}function g(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=g(a);var h=c(a,4);if(null!=b&&b(f-8,h,d))break;value=c(a,d);c(a,4);if("IEND"==h)break}while(d)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),
+b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(l){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var f=c.lastIndexOf("&lt;/mxfile&gt;");f>d&&(b=c.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var t=mxUtils.parseXml(c),
+m=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=m?mxUtils.getXml(m):""}catch(q){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=this.editor.graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var m=this.updatePageRoot(new DiagramPage(d[f]));null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[f+1]));
c.model.execute(new ChangePage(this,m,0==f?m:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(f=0;f<b.length;f++)c.model.execute(new ChangePage(this,
-b[f],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,f,p,m,t,k,w,n){b=null!=b?b:this.editor.graph;p=null!=p?p:!1;w=null!=w?w:!0;var c,g=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":g=c=f;if(null==a)return"";var h=a;if("mxfile"!=h.nodeName.toLowerCase()){var l=b.zapGremlins(mxUtils.getXml(a)),h=b.compress(l);if(b.decompress(h)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,
+b[f],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,f,t,m,q,k,w,n){b=null!=b?b:this.editor.graph;t=null!=t?t:!1;w=null!=w?w:!0;var c,g=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":g=c=f;if(null==a)return"";var h=a;if("mxfile"!=h.nodeName.toLowerCase()){var l=b.zapGremlins(mxUtils.getXml(a)),h=b.compress(l);if(b.decompress(h)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,
h);h=a.ownerDocument.createElement("mxfile");h.appendChild(l)}n?(h=h.cloneNode(!0),h.removeAttribute("userAgent"),h.removeAttribute("version"),h.removeAttribute("editor"),h.removeAttribute("type")):(h.removeAttribute("userAgent"),h.removeAttribute("version"),h.removeAttribute("editor"),h.removeAttribute("type"),h.setAttribute("modified",(new Date).toISOString()),h.setAttribute("host",window.location.hostname),h.setAttribute("agent",navigator.userAgent),h.setAttribute("version",EditorUi.VERSION),h.setAttribute("etag",
-Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&h.setAttribute("type",a));a=mxUtils.getXml(h);if(!m&&!p&&(t||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(h),b,null!=d?d.getTitle():null,c,g);else if(m||!p&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(f=null),a=this.getEmbeddedSvg(a,b,f,null,k,w,g);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);
+Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&h.setAttribute("type",a));a=mxUtils.getXml(h);if(!m&&!t&&(q||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(h),b,null!=d?d.getTitle():null,c,g);else if(m||!t&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(f=null),a=this.getEmbeddedSvg(a,b,f,null,k,w,g);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);
if(a&&null!=this.fileNode&&null!=this.currentPage)if(c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.currentPage.node,c),c=this.fileNode.cloneNode(!1),b)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){if(this.currentPage!=this.pages[d]&&this.pages[d].needsUpdate){var g=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[d].root));this.editor.graph.saveViewState(this.pages[d].viewState,
g);mxUtils.setTextContent(this.pages[d].node,this.editor.graph.compressNode(g));delete this.pages[d].needsUpdate}c.appendChild(this.pages[d].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],d=0;d<a.length;d++){var g=a.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(g)?c.push(g):isNaN(parseInt(g))?g.toLowerCase()!=g?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):g.toUpperCase()!=g?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(g)?
c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(m){a[EditorUi.DIFF_INSERT][c].data=m.message}if(null!=
@@ -2882,209 +2902,209 @@ a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.
c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<
a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),d=0;d<c.length;d++)null!=c[d].getAttribute("value")&&c[d].setAttribute("value","["+c[d].getAttribute("value").length+"]"),null!=c[d].getAttribute("style")&&c[d].setAttribute("style","["+c[d].getAttribute("style").length+"]"),null!=c[d].parentNode&&"root"!=c[d].parentNode.nodeName&&null!=c[d].parentNode.parentNode&&(c[d].setAttribute("id",c[d].parentNode.getAttribute("id")),
c[d].parentNode.parentNode.replaceChild(c[d],c[d].parentNode));c=a.getElementsByTagName("mxGeometry");for(d=0;d<c.length;d++)this.anonymizeAttributes(c[d],b);return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,
-function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,f,p,m,t,k,w){p=null!=p?p:!0;t=null!=t?t:this.getXmlFileData(p,null!=m?m:!1);w=null!=w?w:this.getCurrentFile();m=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&
-(b||!a&&null!=w&&/(\.svg)$/i.test(w.getTitle()))){m=this.createTemporaryGraph(m.getStylesheet());var c=m.getGlobalVariable,g=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(g.root)}a=this.createFileData(t,m,w,window.location.href,a,b,d,f,p,k);m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);return a};EditorUi.prototype.getHtml=function(a,b,d,f,p,m){m=null!=
-m?m:!0;var c=null,g="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=m?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;m=Math.floor(c.x/h-b.view.translate.x);h=Math.floor(c.y/h-b.view.translate.y);c=b.background;null==p&&(b=this.getBasenames().join(";"),0<b.length&&(g="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",m);a.setAttribute("y0",h)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit",
-"0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=f&&a.setAttribute("edit",f));null!=p&&(p=p.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";f=this.editor.graph.compress(a);this.editor.graph.decompress(f)!=a&&(f=encodeURIComponent(a));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==
-p?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+f+"</div>\n</div>\n"+(null==p?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-p+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,f,p){null!=p&&(p=p.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==p?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':
-'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=c&&0<c.length)throw a=mxResources.get("invalidOrMissingFile"),
+function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,f,t,m,q,k,w){t=null!=t?t:!0;q=null!=q?q:this.getXmlFileData(t,null!=m?m:!1);w=null!=w?w:this.getCurrentFile();m=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&
+(b||!a&&null!=w&&/(\.svg)$/i.test(w.getTitle()))){m=this.createTemporaryGraph(m.getStylesheet());var c=m.getGlobalVariable,g=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(g.root)}a=this.createFileData(q,m,w,window.location.href,a,b,d,f,t,k);m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);return a};EditorUi.prototype.getHtml=function(a,b,d,f,t,m){m=null!=
+m?m:!0;var c=null,g="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=m?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;m=Math.floor(c.x/h-b.view.translate.x);h=Math.floor(c.y/h-b.view.translate.y);c=b.background;null==t&&(b=this.getBasenames().join(";"),0<b.length&&(g="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",m);a.setAttribute("y0",h)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit",
+"0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=f&&a.setAttribute("edit",f));null!=t&&(t=t.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";f=this.editor.graph.compress(a);this.editor.graph.decompress(f)!=a&&(f=encodeURIComponent(a));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==
+t?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+f+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+t+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,f,t){null!=t&&(t=t.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==t?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':
+'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=c&&0<c.length)throw a=mxResources.get("invalidOrMissingFile"),
c=c[0].getElementsByTagName("div"),0<c.length&&(a=mxUtils.getTextContent(c[0])),Error(a);c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){this.fileNode=a;this.pages=[];for(a=0;a<c.length;a++){null==c[a].getAttribute("id")&&c[a].setAttribute("id",a);var b=new DiagramPage(c[a]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",
[a+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};
EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,
-b,d,f,p,m,t){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!p),g=c+"."+a;if("xml"==a){var h='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(f)):this.getFileData(!0,null,null,null,f,p));this.saveData(g,a,h,"text/xml")}else if("html"==a)h=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(g,a,h,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=
-c+".png":"jpeg"==a&&(g=c+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=m&&(this.editor.graph.pageVisible=m);var g=this.createDownloadRequest(c,a,f,b,t,p);this.editor.graph.pageVisible=d;return g}catch(z){this.handleError(z)}}));else{var l=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(l)}))});if("svg"==a){var n=this.editor.graph.background;if(t||n==mxConstants.NONE)n=null;var q=this.editor.graph.getSvg(n,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=c+".svg",l=this.getFileData(!1,
-!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),f)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,f,p,m){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==m?!1:"xmlpng"!=b);var g="",h="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";"pdf"==b&&0==m&&(h="&allPages=1");if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(m=
-0;m<this.pages.length;m++)if(this.pages[m]==this.currentPage){g="&from="+m;break}m=this.editor.graph.background;"png"==b&&p&&(m=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+g+h+"&bg="+(null!=m?m:mxConstants.NONE)+"&base64="+f+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,g=mxUtils.bind(this,function(d){var g=
+b,d,f,t,m,q){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!t),g=c+"."+a;if("xml"==a){var h='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(f)):this.getFileData(!0,null,null,null,f,t));this.saveData(g,a,h,"text/xml")}else if("html"==a)h=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(g,a,h,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=
+c+".png":"jpeg"==a&&(g=c+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=m&&(this.editor.graph.pageVisible=m);var g=this.createDownloadRequest(c,a,f,b,q,t);this.editor.graph.pageVisible=d;return g}catch(z){this.handleError(z)}}));else{var l=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+function(){mxUtils.popup(l)}))});if("svg"==a){var n=this.editor.graph.background;if(q||n==mxConstants.NONE)n=null;var p=this.editor.graph.getSvg(n,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=c+".svg",l=this.getFileData(!1,
+!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),f)}}catch(Q){this.handleError(Q)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,f,t,m){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==m?!1:"xmlpng"!=b);var g="",h="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";"pdf"==b&&0==m&&(h="&allPages=1");if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(m=
+0;m<this.pages.length;m++)if(this.pages[m]==this.currentPage){g="&from="+m;break}m=this.editor.graph.background;"png"==b&&t&&(m=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+g+h+"&bg="+(null!=m?m:mxConstants.NONE)+"&base64="+f+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,g=mxUtils.bind(this,function(d){var g=
null!=a.data?a.data:"";null!=d&&0<d.length&&(0<g.length&&(g+="\n"),g+=d);d=new LocalFile(this,"csv"!=a.format&&0<g.length?g:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==a.format&&this.importCsv(g,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,h=null,
l=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),m()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(h);h=window.setTimeout(l,f)});this.editor.addListener("pageSelected",
mxUtils.bind(this,function(){m();l()}));m();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.loadUrl(f,mxUtils.bind(this,function(a){g(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else g("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});
-return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,m=f.getModel();m.beginUpdate();var t=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=m.getCell(a.getAttribute("id"));if(null!=k){try{var w=a.getAttribute("value");if(null!=w){var n=mxUtils.parseXml(w).documentElement;if(null!=n)if("1"==n.getAttribute("replace-value"))m.setValue(k,n);else for(var q=n.attributes,v=0;v<
-q.length;v++)f.setAttributeForCell(k,q[v].nodeName,0<q[v].nodeValue.length?q[v].nodeValue:null)}}catch(B){null!=window.console&&console.log("Error in value for "+k.id+": "+B)}try{var A=a.getAttribute("style");null!=A&&f.model.setStyle(k,A)}catch(B){null!=window.console&&console.log("Error in style for "+k.id+": "+B)}try{var r=a.getAttribute("icon");if(null!=r){var u=0<r.length?JSON.parse(r):null;null!=u&&u.append||f.removeCellOverlays(k);null!=u&&f.addCellOverlay(k,c(u))}}catch(B){null!=window.console&&
-console.log("Error in icon for "+k.id+": "+B)}try{var E=a.getAttribute("geometry");if(null!=E){var E=JSON.parse(E),H=f.getCellGeometry(k);if(null!=H){H=H.clone();for(key in E){var L=parseFloat(E[key]);"dx"==key?H.x+=L:"dy"==key?H.y+=L:"dw"==key?H.width+=L:"dh"==key?H.height+=L:H[key]=parseFloat(E[key])}f.model.setGeometry(k,H)}}}catch(B){null!=window.console&&console.log("Error in icon for "+k.id+": "+B)}}}else if("model"==a.nodeName){for(var z=a.firstChild;null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
-z.nextSibling;null!=z&&(new mxCodec(a.firstChild)).decode(z,m)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(t=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{m.endUpdate()}null!=t&&this.chromelessResize&&this.chromelessResize(!0,
-t)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",g=c.lastIndexOf(".");0<=g&&(d=c.substring(g),c=c.substring(0,g));if(b)var f=new Date,g=f.getFullYear(),t=f.getMonth()+1,k=f.getDate(),w=f.getHours(),n=f.getMinutes(),f=f.getSeconds(),c=c+(" "+(g+"-"+t+"-"+k+"-"+w+"-"+n+"-"+f));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);
+return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,m=f.getModel();m.beginUpdate();var q=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=m.getCell(a.getAttribute("id"));if(null!=k){try{var w=a.getAttribute("value");if(null!=w){var n=mxUtils.parseXml(w).documentElement;if(null!=n)if("1"==n.getAttribute("replace-value"))m.setValue(k,n);else for(var p=n.attributes,v=0;v<
+p.length;v++)f.setAttributeForCell(k,p[v].nodeName,0<p[v].nodeValue.length?p[v].nodeValue:null)}}catch(B){null!=window.console&&console.log("Error in value for "+k.id+": "+B)}try{var A=a.getAttribute("style");null!=A&&f.model.setStyle(k,A)}catch(B){null!=window.console&&console.log("Error in style for "+k.id+": "+B)}try{var r=a.getAttribute("icon");if(null!=r){var u=0<r.length?JSON.parse(r):null;null!=u&&u.append||f.removeCellOverlays(k);null!=u&&f.addCellOverlay(k,c(u))}}catch(B){null!=window.console&&
+console.log("Error in icon for "+k.id+": "+B)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),I=f.getCellGeometry(k);if(null!=I){I=I.clone();for(key in F){var M=parseFloat(F[key]);"dx"==key?I.x+=M:"dy"==key?I.y+=M:"dw"==key?I.width+=M:"dh"==key?I.height+=M:I[key]=parseFloat(F[key])}f.model.setGeometry(k,I)}}}catch(B){null!=window.console&&console.log("Error in icon for "+k.id+": "+B)}}}else if("model"==a.nodeName){for(var z=a.firstChild;null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
+z.nextSibling;null!=z&&(new mxCodec(a.firstChild)).decode(z,m)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(q=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{m.endUpdate()}null!=q&&this.chromelessResize&&this.chromelessResize(!0,
+q)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",g=c.lastIndexOf(".");0<=g&&(d=c.substring(g),c=c.substring(0,g));if(b)var f=new Date,g=f.getFullYear(),q=f.getMonth()+1,k=f.getDate(),w=f.getHours(),n=f.getMinutes(),f=f.getSeconds(),c=c+(" "+(g+"-"+q+"-"+k+"-"+w+"-"+n+"-"+f));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);
var b=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display=
"none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+
"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&
-window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:"File",action:"open",label:a.getMode()+"."+a.getSize()});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(p){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
-1),mxSettings.save()}catch(p){}}catch(p){this.fileLoadedError=p;null!=window.console&&console.log("error in fileLoaded:",a,p);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=p&&null!=p.message?":err:"+encodeURIComponent(p.message):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}catch(m){}this.handleError(p,
+window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:"File",action:"open",label:a.getMode()+"."+a.getSize()});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
+1),mxSettings.save()}catch(t){}}catch(t){this.fileLoadedError=t;null!=window.console&&console.log("error in fileLoaded:",a,t);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(m){}this.handleError(t,
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()}),!0)}else d();return b};EditorUi.prototype.isActive=function(){return this.editor.graph.isEditing()||this.editor.graph.isMouseDown||null!=this.dialog};EditorUi.prototype.runWhenIdle=function(a){if(this.isActive()){var c=mxUtils.bind(this,function(){this.isActive()||(this.editor.graph.removeMouseListener(b),
this.editor.removeListener("hideDialog",c),this.editor.graph.removeListener(c),null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a())}),b={mouseDown:function(){},mouseMove:function(){},mouseUp:c};this.editor.graph.addListener(mxEvent.EDITING_STOPPED,c);this.editor.graph.addListener(mxEvent.ESCAPE,c);this.editor.graph.addMouseListener(b);this.editor.addListener("hideDialog",c)}else null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a()};EditorUi.prototype.getHashValueForPages=
-function(a,b){var c=0,d=new mxGraphModel,g=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var t=a[f].node.cloneNode(!1);t.removeAttribute("name");d.root=a[f].root;var k=g.encode(d);this.editor.graph.saveViewState(a[f].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");t.appendChild(k);null!=b&&(b.eltCount+=t.getElementsByTagName("*").length,b.nodeCount+=t.getElementsByTagName("mxCell").length);
-c=(c<<5)-c+this.hashValue(t,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=
+function(a,b){var c=0,d=new mxGraphModel,g=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var q=a[f].node.cloneNode(!1);q.removeAttribute("name");d.root=a[f].root;var k=g.encode(d);this.editor.graph.saveViewState(a[f].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");q.appendChild(k);null!=b&&(b.eltCount+=q.getElementsByTagName("*").length,b.nodeCount+=q.getElementsByTagName("mxCell").length);
+c=(c<<5)-c+this.hashValue(q,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=
a.attributes.length);for(var g=0;g<a.attributes.length;g++){var f=a.attributes[g].name,h=null!=b?b(a,f,a.attributes[g].value,!0):a.attributes[g].value;null!=h&&(c^=this.hashValue(f,b,d)+this.hashValue(h,b,d))}}if(null!=a.childNodes)for(g=0;g<a.childNodes.length;g++)c=(c<<5)-c+this.hashValue(a.childNodes[g],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(g=0;g<a.length;g++)b=(b<<5)-b+a.charCodeAt(g)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=
-function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,f,p,m,t){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
+function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,f,t,m,q){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];
if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());
if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],
-c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=null,f=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign="center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),b.appendChild(g)):this.addLibraryEntries(c,b)});if(null!=this.sidebar&&null!=b)for(var h=
+c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});if(null!=this.sidebar&&null!=b)for(var h=
0;h<b.length;h++)mxUtils.bind(this,function(a){var c=a.data;null!=c&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){c=this.convertDataUri(c);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+c,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var c=this.stringToCells(this.editor.graph.decompress(a.xml));
-return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(c);var w=k.parentNode.previousSibling;d=w.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&w.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top=
-"0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");w.style.position="relative";var q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get("close"));q.setAttribute("valign","absmiddle");q.setAttribute("border","0");q.style.margin="0 3px";var v=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=
-mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var r=this.editor.graph,F=null,u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),E=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=F&&null!=F.parentNode&&F.parentNode.removeChild(F),F=q.cloneNode(!1),
-F.setAttribute("src",Editor.spinImage),F.setAttribute("title",mxResources.get("saving")),F.style.cursor="default",F.style.marginRight="2px",F.style.marginTop="-2px",n.insertBefore(F,n.firstChild),w.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=F&&null!=F.parentNode&&(F.parentNode.removeChild(F),w.style.paddingRight=18*n.childNodes.length+"px")})):null==v&&(v=q.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",
-mxResources.get("save")),n.insertBefore(v,n.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==v||a.isModified()||(w.style.paddingRight=18*n.childNodes.length+"px",v.parentNode.removeChild(v),v=null)});mxEvent.consume(c)})),w.style.paddingRight=18*n.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,f){a=r.cloneCells(mxUtils.sortCells(r.model.getTopmostCells(a)));for(var h=
-0;h<a.length;h++){var l=r.getCellGeometry(a[h]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);E(d);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),L=mxUtils.bind(this,function(a){if(r.isSelectionEmpty())r.getRubberband().isActive()?(r.getRubberband().execute(a),
-r.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=r.getSelectionCells(),b=r.view.getBounds(c),d=r.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=r.view.translate.x;b.y-=r.view.translate.y;H(c,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.panningManager&&null!=r.graphHandler.shape&&(r.graphHandler.shape.node.style.visibility=
-"hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",r.panningManager.stop(),r.autoScroll=!1,null!=r.graphHandler.guide&&r.graphHandler.guide.setVisible(!1),null!=r.graphHandler.hint&&(r.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.panningManager&&null!=r.graphHandler&&(k.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),
-k.style.cursor="default",this.sidebar.showTooltips=!0,r.panningManager.stop(),r.graphHandler.reset(),r.isMouseDown=!1,r.autoScroll=!0,L(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.graphHandler.shape&&(r.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",r.autoScroll=!0,null!=r.graphHandler.guide&&r.graphHandler.guide.setVisible(!0),null!=r.graphHandler.hint&&(r.graphHandler.hint.style.visibility=
-"visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=g&&(g.style.border=
-"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,h,l,m,p,t,w,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,p),c)],c[0].vertex=!0,H(c,new mxRectangle(0,0,m,p),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&
-0<b.length&&(g.parentNode.removeChild(g),g=null);else{var v=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var h=mxUtils.parseXml(c);if("mxlibrary"==h.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(h.documentElement));f(l,k);b=b.concat(l);E(a);this.spinner.stop();v=!0}catch(C){}else if("mxfile"==h.documentElement.nodeName)try{for(var m=h.documentElement.getElementsByTagName("diagram"),h=0;h<m.length;h++){var l=mxUtils.getTextContent(m[h]),p=this.stringToCells(this.editor.graph.decompress(l)),
-t=this.editor.graph.getBoundingBoxFromGeometry(p);H(p,new mxRectangle(0,0,t.width,t.height),a)}v=!0}catch(C){null!=window.console&&console.log("error in drop handler:",C)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=n&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(n,function(a){x(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(c,t)&&null!=n?this.parseFile(n,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",
-k.style.cursor="");a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));n.insertBefore(q,n.firstChild);mxEvent.addListener(q,"click",u);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&u(a)});d=q.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));n.insertBefore(d,n.firstChild);mxEvent.addListener(d,"click",L);this.isOffline()||".scratchpad"!=
+return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var w=k.parentNode.previousSibling;d=w.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&w.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top=
+"0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");w.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("valign","absmiddle");p.setAttribute("border","0");p.style.margin="0 3px";var v=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=
+mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var r=this.editor.graph,G=null,u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=G&&null!=G.parentNode&&G.parentNode.removeChild(G),G=p.cloneNode(!1),
+G.setAttribute("src",Editor.spinImage),G.setAttribute("title",mxResources.get("saving")),G.style.cursor="default",G.style.marginRight="2px",G.style.marginTop="-2px",n.insertBefore(G,n.firstChild),w.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=G&&null!=G.parentNode&&(G.parentNode.removeChild(G),w.style.paddingRight=18*n.childNodes.length+"px")})):null==v&&(v=p.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",
+mxResources.get("save")),n.insertBefore(v,n.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==v||a.isModified()||(w.style.paddingRight=18*n.childNodes.length+"px",v.parentNode.removeChild(v),v=null)});mxEvent.consume(c)})),w.style.paddingRight=18*n.childNodes.length+"px")}),I=mxUtils.bind(this,function(a,c,d,g){a=r.cloneCells(mxUtils.sortCells(r.model.getTopmostCells(a)));for(var h=
+0;h<a.length;h++){var l=r.getCellGeometry(a[h]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,g||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=g&&(a.title=g);b.push(a);F(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),M=mxUtils.bind(this,function(a){if(r.isSelectionEmpty())r.getRubberband().isActive()?(r.getRubberband().execute(a),
+r.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=r.getSelectionCells(),b=r.view.getBounds(c),d=r.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=r.view.translate.x;b.y-=r.view.translate.y;I(c,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.panningManager&&null!=r.graphHandler.shape&&(r.graphHandler.shape.node.style.visibility=
+"hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",r.panningManager.stop(),r.autoScroll=!1,null!=r.graphHandler.guide&&r.graphHandler.guide.setVisible(!1),null!=r.graphHandler.hint&&(r.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.panningManager&&null!=r.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),
+k.style.cursor="default",this.sidebar.showTooltips=!0,r.panningManager.stop(),r.graphHandler.reset(),r.isMouseDown=!1,r.autoScroll=!0,M(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.graphHandler.shape&&(r.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",r.autoScroll=!0,null!=r.graphHandler.guide&&r.graphHandler.guide.setVisible(!0),null!=r.graphHandler.hint&&(r.graphHandler.hint.style.visibility=
+"visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border=
+"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,h,l,m,q,t,w,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,q),c)],c[0].vertex=!0,I(c,new mxRectangle(0,0,m,q),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&
+0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var h=mxUtils.parseXml(c);if("mxlibrary"==h.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(h.documentElement));g(l,k);b=b.concat(l);F(a);this.spinner.stop();v=!0}catch(D){}else if("mxfile"==h.documentElement.nodeName)try{for(var m=h.documentElement.getElementsByTagName("diagram"),h=0;h<m.length;h++){var l=mxUtils.getTextContent(m[h]),q=this.stringToCells(this.editor.graph.decompress(l)),
+t=this.editor.graph.getBoundingBoxFromGeometry(q);I(q,new mxRectangle(0,0,t.width,t.height),a)}v=!0}catch(D){null!=window.console&&console.log("error in drop handler:",D)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=n&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(n,function(a){x(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,t)&&null!=n?this.parseFile(n,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",
+k.style.cursor="");a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));n.insertBefore(p,n.firstChild);mxEvent.addListener(p,"click",u);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&u(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));n.insertBefore(d,n.firstChild);mxEvent.addListener(d,"click",M);this.isOffline()||".scratchpad"!=
a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),n.insertBefore(d,n.firstChild))}w.appendChild(n);w.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=
-0;c<a.length;c++){var d=a[c],g=d.data;if(null!=g){var g=this.convertDataUri(g),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+g,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(g=this.stringToCells(this.editor.graph.decompress(d.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
+0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(this.editor.graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),
Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor=
"#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
-"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,f,p){a=new ImageDialog(this,a,b,d,f,p);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
-!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,f,p){a=new LibraryDialog(this,a,b,d,f,p);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
+"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,f,k){a=new ImageDialog(this,a,b,d,f,k);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
+!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,f,k){a=new LibraryDialog(this,a,b,d,f,k);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();
mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,f){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=g||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var h=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=g)if(null!=g.retry&&(h=mxResources.get("cancel"),l=function(){c();g.retry()}),404==g.code||404==g.status||403==g.code){a=403==
g.code?null!=g.message?mxUtils.htmlEntities(g.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+='<br><a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else null!=g.message?a=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error?a=mxUtils.htmlEntities(g.response.error):
-"undefined"!==window.App&&(g.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,h,d,l,null,null,null,null,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,f,p,m,t,k,w,n,q,v,r){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),f,p,m,t,v,k,w);this.showDialog(a.container,n||340,q||(null!=b&&120<b.length?180:150),!0,!1,r);a.init()};EditorUi.prototype.alert=
-function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,f,p,m){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},f,p);this.showDialog(a.container,340,90,!0,m);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=
+"undefined"!==window.App&&(g.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,h,d,l,null,null,null,null,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,f,k,m,q,n,w,p,r,v,A){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),f,k,m,q,v,n,w);this.showDialog(a.container,p||340,r||(null!=b&&120<b.length?180:150),!0,!1,A);a.init()};EditorUi.prototype.alert=
+function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,f,k,m){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},f,k);this.showDialog(a.container,340,90,!0,m);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=
function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,
-"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,g=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(g,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&
-!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,p){if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,
+"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&
+!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,k){if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,
b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else{var c=document.createElement("a"),g=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var h=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),g=65==(h?parseInt(h[2],10):!1)?!1:g;if(g||this.isOffline()){c.href=URL.createObjectURL(f?this.base64ToBlob(a,
-d):new Blob([a],{type:d}));g?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(w){}}else this.createEchoRequest(a,b,d,f,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,f,p,m){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=p?"&format="+p:"")+(null!=m?"&base64="+m:"")+(null!=b?"&filename="+
-encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,g=Math.ceil(d/1024),f=Array(g),t=0;t<g;++t){for(var k=1024*t,w=Math.min(k+1024,d),n=Array(w-k),q=0;k<w;++q,++k)n[q]=c[k].charCodeAt(0);f[t]=new Uint8Array(n)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,f,p,m,t){m=null!=m?m:!1;t=null!=t?t:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(m);b=new CreateDialog(this,
+d):new Blob([a],{type:d}));g?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(w){}}else this.createEchoRequest(a,b,d,f,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,f,k,m){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=k?"&format="+k:"")+(null!=m?"&base64="+m:"")+(null!=b?"&filename="+
+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),g=Array(f),q=0;q<f;++q){for(var k=1024*q,w=Math.min(k+1024,d),n=Array(w-k),p=0;k<w;++p,++k)n[p]=c[k].charCodeAt(0);g[q]=new Uint8Array(n)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,f,k,m,q){m=null!=m?m:!1;q=null!=q?q:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(m);b=new CreateDialog(this,
b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a,!1)),g.document.close())}else this.openInNewWindow(a,d,f);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,f):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(g){try{this.exportFile(a,c,d,f,b,g)}catch(v){this.handleError(v)}}))}catch(y){this.handleError(y)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,t,null,1<p,4<p&&(!m||6>p)?3:4,a,d,f);this.showDialog(b.container,420,1==p?160:4<p?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,q,null,1<k,4<k&&(!m||6>k)?3:4,a,d,f);this.showDialog(b.container,420,1==k?160:4<k?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+
b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);
null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
-"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var g=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});g.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){g.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));
+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));
a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,
-arguments)};EditorUi.prototype.saveData=function(a,b,d,f,p){this.isLocalFileSave()?this.saveLocalFile(d,a,f,p,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,f,p,b,c)}),d,p,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,p,m,t){t=null!=t?t:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var g=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==
+arguments)};EditorUi.prototype.saveData=function(a,b,d,f,k){this.isLocalFileSave()?this.saveLocalFile(d,a,f,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,f,k,b,c)}),d,k,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,k,m,q){q=null!=q?q:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var g=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==
c||null==c||"_blank"==c?"0":"1");null!=g&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?g.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){m=null!=m?m:"pdf"==b?"application/pdf":"image/"+b;if(null!=f)try{this.exportFile(f,a,m,!0,c,d)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=g.getStatus()&&299>=g.getStatus())try{this.exportFile(g.getText(),a,m,!0,c,d)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,t,null,1<c,4<c?3:4,f,m,p);this.showDialog(a.container,380,1==c?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,f,p,m){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,f,p,m,t,
-k,n,q){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var g=this.editor.graph.getSvg(c,a,t,k,null,d,null,null,"blank"==q?"_blank":"self"==q?"_top":null);f&&this.editor.graph.addSvgShadow(g,g);var h=this.getBaseFilename()+".svg",l=mxUtils.bind(this,function(a){this.spinner.stop();p&&a.setAttribute("content",this.getFileData(!0,null,
-null,null,d,n));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",b,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,g,!1,mxUtils.bind(this,function(){m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,l,this.thumbImageCache)):l(g)}))}};EditorUi.prototype.addRadiobox=function(a,b,d,f,p,m,t){return this.addCheckbox(a,d,f,p,m,t,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,f,p,m,t,k){m=null!=m?m:!0;var c=document.createElement("input");
-c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",t?"radio":"checkbox");t="geCheckbox-"+Editor.guid();c.id=t;null!=k&&c.setAttribute("name",k);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");m&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",t),a.appendChild(d),p||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+
-":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),g="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(g=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,
-mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,g,mxResources.get("ok"),function(a){null!=a?g=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled",
-"disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":g:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){t.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+
-"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));d.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));d.appendChild(g);g=document.createElement("option");
-g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));d.appendChild(g);b&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(g));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",t=null,t=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();t.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";t.style.marginLeft="4px";t.style.height="22px";t.style.width="22px";t.style.position="relative";t.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";t.className="geColorBtn";a.appendChild(t);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,f,p,m,t,k){var c=this.getCurrentFile(),g=[];f&&(g.push("lightbox=1"),"auto"!=a&&g.push("target="+
-a),null!=b&&b!=mxConstants.NONE&&g.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=p&&0<p.length&&g.push("edit="+encodeURIComponent(p)),m&&g.push("layers=1"),this.editor.graph.foldingEnabled&&g.push("nav=1"));d&&(a=this.getSelectedPageIndex(),0<a&&g.push("page="+a));a=!0;null!=t?d="#U"+encodeURIComponent(t):(c=this.getCurrentFile(),k||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&g.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<g.length?"?"+g.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,p,m,t,k,n,q,r){this.getBasenames();var c={};""!=p&&p!=mxConstants.NONE&&(c.highlight=p);"auto"!==f&&(c.target=f);
-n||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];t&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);k&&d.push("layers");0<d.length&&(n&&d.push("lightbox"),c.toolbar=d.join(" "));null!=q&&0<q.length&&(c.edit=q);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!t);b='<div class="mxgraph" style="'+(m?"max-width:100%;":
+function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,q,null,1<c,4<c?3:4,f,m,k);this.showDialog(a.container,380,1==c?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,f,k,m){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,f,k,m,q,
+n,w,p){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var g=this.editor.graph.getSvg(c,a,q,n,null,d,null,null,"blank"==p?"_blank":"self"==p?"_top":null);f&&this.editor.graph.addSvgShadow(g,g);var h=this.getBaseFilename()+".svg",l=mxUtils.bind(this,function(a){this.spinner.stop();k&&a.setAttribute("content",this.getFileData(!0,null,
+null,null,d,w));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",b,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,g,!1,mxUtils.bind(this,function(){m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,l,this.thumbImageCache)):l(g)}))}};EditorUi.prototype.addRadiobox=function(a,b,d,f,k,m,q){return this.addCheckbox(a,d,f,k,m,q,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,f,k,m,q,n){m=null!=m?m:!0;var c=document.createElement("input");
+c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",q?"radio":"checkbox");q="geCheckbox-"+Editor.guid();c.id=q;null!=n&&c.setAttribute("name",n);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");m&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",q),a.appendChild(d),k||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+
+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));g.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,
+mxResources.get("custom")+"...");g.appendChild(d);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled",
+"disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===g.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){q.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+
+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",q=null,q=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;c()});mxEvent.consume(a)}));c();q.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";q.style.marginLeft="4px";q.style.height="22px";q.style.width="22px";q.style.position="relative";q.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";q.className="geColorBtn";a.appendChild(q);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,f,k,m,q,n){var c=this.getCurrentFile(),g=[];f&&(g.push("lightbox=1"),"auto"!=a&&g.push("target="+
+a),null!=b&&b!=mxConstants.NONE&&g.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=k&&0<k.length&&g.push("edit="+encodeURIComponent(k)),m&&g.push("layers=1"),this.editor.graph.foldingEnabled&&g.push("nav=1"));d&&(a=this.getSelectedPageIndex(),0<a&&g.push("page="+a));a=!0;null!=q?d="#U"+encodeURIComponent(q):(c=this.getCurrentFile(),n||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&g.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<g.length?"?"+g.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,k,m,q,n,w,p,r){this.getBasenames();var c={};""!=k&&k!=mxConstants.NONE&&(c.highlight=k);"auto"!==f&&(c.target=f);
+w||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];q&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);n&&d.push("layers");0<d.length&&(w&&d.push("lightbox"),c.toolbar=d.join(" "));null!=p&&0<p.length&&(c.edit=p);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!q);b='<div class="mxgraph" style="'+(m?"max-width:100%;":
"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";r(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,f){var c=document.createElement("div");
c.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(g);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name",
"type-embedhtmldialog");g=l.cloneNode(!0);g.setAttribute("value","copy");h.appendChild(g);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(k);mxUtils.br(h);h.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));h.appendChild(k);var n=this.getCurrentFile();null==d&&null!=n&&n.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href",
-"javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),h.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));g.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(h);var q=this.addLinkSection(c),v=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";
-r.style.width="60px";r.style.marginLeft="4px";r.style.marginRight="12px";r.value="100%";c.appendChild(r);var F=this.addCheckbox(c,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),h,!h),E=this.addCheckbox(c,mxResources.get("layers"),!0),H=this.addCheckbox(c,mxResources.get("lightbox"),!0),L=this.addEditButton(c,H),z=L.getEditInput();z.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?z.removeAttribute("disabled"):
-z.setAttribute("disabled","disabled");z.checked&&H.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(l.checked?d:null,v.checked,r.value,q.getTarget(),q.getColor(),F.checked,u.checked,E.checked,H.checked,L.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,p,m){var c=document.createElement("div");c.style.whiteSpace=
+"javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),h.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));g.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(h);var p=this.addLinkSection(c),v=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";
+r.style.width="60px";r.style.marginLeft="4px";r.style.marginRight="12px";r.value="100%";c.appendChild(r);var G=this.addCheckbox(c,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),h,!h),F=this.addCheckbox(c,mxResources.get("layers"),!0),I=this.addCheckbox(c,mxResources.get("lightbox"),!0),M=this.addEditButton(c,I),z=M.getEditInput();z.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?z.removeAttribute("disabled"):
+z.setAttribute("disabled","disabled");z.checked&&I.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(l.checked?d:null,v.checked,r.value,p.getTarget(),p.getColor(),G.checked,u.checked,F.checked,I.checked,M.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,k,m){var c=document.createElement("div");c.style.whiteSpace=
"nowrap";var g=document.createElement("h3");mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(g);var h=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=h&&h.constructor==window.DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var k=document.createElement("div");k.style.whiteSpace="normal";mxUtils.write(k,mxResources.get("linkAccountRequired"));l.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));k.style.marginTop="12px";k.className="geBtn";l.appendChild(k);c.appendChild(l);k=document.createElement("a");k.style.paddingLeft="12px";k.style.color="gray";k.style.fontSize="11px";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("check"));
-l.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,q=null;if(null!=d||null!=f)a+=30,mxUtils.write(c,mxResources.get("width")+":"),n=document.createElement("input"),
-n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",c.appendChild(n),mxUtils.write(c,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=f+"px",c.appendChild(q),mxUtils.br(c);var r=this.addLinkSection(c,m);d=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==h||h.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var E=this.addCheckbox(c,mxResources.get("lightbox"),!0),H=this.addEditButton(c,E),L=H.getEditInput(),z=this.addCheckbox(c,mxResources.get("layers"),!0);z.style.marginLeft=L.style.marginLeft;z.style.marginBottom="16px";z.style.marginTop="8px";mxEvent.addListener(E,"change",function(){E.checked?(z.removeAttribute("disabled"),L.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),L.setAttribute("disabled",
-"disabled"));L.checked&&E.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){p(r.getTarget(),r.getColor(),null==u?!0:u.checked,E.checked,H.getLink(),z.checked,null!=n?n.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():
+var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));l.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));n.style.marginTop="12px";n.className="geBtn";l.appendChild(n);c.appendChild(l);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));
+l.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var t=null,p=null;if(null!=d||null!=f)a+=30,mxUtils.write(c,mxResources.get("width")+":"),t=document.createElement("input"),
+t.setAttribute("type","text"),t.style.marginRight="16px",t.style.width="50px",t.style.marginLeft="6px",t.style.marginRight="16px",t.style.marginBottom="10px",t.value="100%",c.appendChild(t),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=f+"px",c.appendChild(p),mxUtils.br(c);var r=this.addLinkSection(c,m);d=null!=this.pages&&1<this.pages.length;var u=null;
+if(null==h||h.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var F=this.addCheckbox(c,mxResources.get("lightbox"),!0),I=this.addEditButton(c,F),M=I.getEditInput(),z=this.addCheckbox(c,mxResources.get("layers"),!0);z.style.marginLeft=M.style.marginLeft;z.style.marginBottom="16px";z.style.marginTop="8px";mxEvent.addListener(F,"change",function(){F.checked?(z.removeAttribute("disabled"),M.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),M.setAttribute("disabled",
+"disabled"));M.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(r.getTarget(),r.getColor(),null==u?!0:u.checked,F.checked,I.getLink(),z.checked,null!=t?t.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():
document.execCommand("selectAll",!1,null)):r.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g);var h=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=f?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
-!0),g=this.editor.graph,k=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!h.checked,null!=l?l.checked:!1,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,f?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,f,k,m,t,n){t=null!=t?t:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=
-this.editor.graph,h="jpeg"==n?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(l);mxUtils.write(c,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";c.appendChild(p);mxUtils.write(c,mxResources.get("borderWidth")+":");
-var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";c.appendChild(q);mxUtils.br(c);var r=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),x=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled",
-"disabled");u.setAttribute("type","checkbox");m&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),h+=26,mxEvent.addListener(x,"change",function(){x.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var L=this.addCheckbox(c,mxResources.get("shadow"),g.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type",
-"checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(c.appendChild(z),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),h+=26);var B=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),t,null,null,"jpeg"!=n),J=null!=this.pages&&1<this.pages.length,N=this.addCheckbox(c,J?mxResources.get("allPages"):"",J,!J,null,"jpeg"!=n);N.style.marginLeft="24px";N.style.marginBottom="16px";J||(N.style.display="none");mxEvent.addListener(B,"change",function(){B.checked&&
-J?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")});t&&J||N.setAttribute("disabled","disabled");var R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginRight="10px";R.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));R.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));R.appendChild(a);
-a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));R.appendChild(a);"svg"==n&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(R),mxUtils.br(c),mxUtils.br(c),h+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=p.value;k(p.value,r.checked,!x.checked,L.checked,B.checked,z.checked,q.value,u.checked,!N.checked,R.value)}),null,d,f);this.showDialog(d.container,340,
-h,!0,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,f,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(h)}var l=this.addCheckbox(c,mxResources.get("fit"),
-!0),p=this.addCheckbox(c,mxResources.get("shadow"),g.shadowVisible&&f,!f),n=this.addCheckbox(c,d),v=this.addCheckbox(c,mxResources.get("lightbox"),!0),q=this.addEditButton(c,v),r=q.getEditInput(),u=1<g.model.getChildCount(g.model.getRoot()),E=this.addCheckbox(c,mxResources.get("layers"),u,!u);E.style.marginLeft=r.style.marginLeft;E.style.marginBottom="12px";E.style.marginTop="8px";mxEvent.addListener(v,"change",function(){v.checked?(u&&E.removeAttribute("disabled"),r.removeAttribute("disabled")):
-(E.setAttribute("disabled","disabled"),r.setAttribute("disabled","disabled"));r.checked&&v.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(l.checked,p.checked,n.checked,v.checked,q.getLink(),E.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,k,m,t,n){function c(c){var b=" ",h="";f&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var l="";d&&(l=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');t('<img src="'+c+'"'+l+(""!=h?' style="'+h+'"':"")+b+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),
+!0),g=this.editor.graph,k=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!h.checked,null!=l?l.checked:!1,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,f?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,f,k,m,q,n){q=null!=q?q:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=
+this.editor.graph,h="jpeg"==n?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(l);mxUtils.write(c,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";c.appendChild(t);mxUtils.write(c,mxResources.get("borderWidth")+":");
+var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";c.appendChild(p);mxUtils.br(c);var r=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),x=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled",
+"disabled");u.setAttribute("type","checkbox");m&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),h+=26,mxEvent.addListener(x,"change",function(){x.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var M=this.addCheckbox(c,mxResources.get("shadow"),g.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type",
+"checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(c.appendChild(z),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),h+=26);var B=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),q,null,null,"jpeg"!=n),K=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(c,K?mxResources.get("allPages"):"",K,!K,null,"jpeg"!=n);O.style.marginLeft="24px";O.style.marginBottom="16px";K||(O.style.display="none");mxEvent.addListener(B,"change",function(){B.checked&&
+K?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});q&&K||O.setAttribute("disabled","disabled");var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginRight="10px";T.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));T.appendChild(a);
+a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));T.appendChild(a);"svg"==n&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(T),mxUtils.br(c),mxUtils.br(c),h+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=t.value;k(t.value,r.checked,!x.checked,M.checked,B.checked,z.checked,p.value,u.checked,!O.checked,T.value)}),null,d,f);this.showDialog(d.container,340,
+h,!0,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,f,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(h)}var l=this.addCheckbox(c,mxResources.get("fit"),
+!0),n=this.addCheckbox(c,mxResources.get("shadow"),g.shadowVisible&&f,!f),t=this.addCheckbox(c,d),v=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,v),r=p.getEditInput(),u=1<g.model.getChildCount(g.model.getRoot()),F=this.addCheckbox(c,mxResources.get("layers"),u,!u);F.style.marginLeft=r.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(v,"change",function(){v.checked?(u&&F.removeAttribute("disabled"),r.removeAttribute("disabled")):
+(F.setAttribute("disabled","disabled"),r.setAttribute("disabled","disabled"));r.checked&&v.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(l.checked,n.checked,t.checked,v.checked,p.getLink(),F.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,k,m,q,n){function c(c){var b=" ",h="";f&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var l="";d&&(l=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');q('<img src="'+c+'"'+l+(""!=h?' style="'+h+'"':"")+b+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),
null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),g.width*g.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";d&&(h="&w="+Math.round(2*g.width)+"&h="+Math.round(2*g.height));var l=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+h+"&xml="+encodeURIComponent(b));l.send(mxUtils.bind(this,function(){200<=l.getStatus()&&299>=l.getStatus()?c("data:image/png;base64,"+l.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,f,k,m,t){var c=this.editor.graph.getSvg(),g=c.getElementsByTagName("a");if(null!=g)for(var h=0;h<g.length;h++){var l=g[h].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==g[h].getAttribute("target")&&g[h].removeAttribute("target")}f&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var p=" ",n="";f&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){t('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+p+"/>")}))}else n="",f&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=n&&c.setAttribute("style",n),t(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
+EditorUi.prototype.createEmbedSvg=function(a,b,d,f,k,m,q){var c=this.editor.graph.getSvg(),g=c.getElementsByTagName("a");if(null!=g)for(var h=0;h<g.length;h++){var l=g[h].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==g[h].getAttribute("target")&&g[h].removeAttribute("target")}f&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",t="";f&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");a&&(t+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){q('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=t?' style="'+t+'"':"")+n+"/>")}))}else t="",f&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),t+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=t&&c.setAttribute("style",t),q(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,f){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,
-function(){f()}))}),0)):f()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],g=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:g.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=
-this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(m){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),g=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
-f=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(g)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(D){null!=
-b&&b(D)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,k,m,t){t=b.background;t==mxConstants.NONE&&(t=null);b=b.getSvg(t,null,null,null,null,m);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,f,k,m,t,n,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,n):null,q)}catch(v){"Invalid image"==v.message?this.downloadFile(q):this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,m,t)}catch(y){this.spinner.stop(),this.handleError(y)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
-"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,f={},m=mxUtils.bind(this,function(){if(0==d){for(var g=[b[0]],h=1;h<b.length;h++){var l=b[h].indexOf(")");g.push('url("');g.push(f[c(b[h].substring(0,l))]);g.push('"'+b[h].substring(l))}this.editor.resolvedFontCss=g.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var n=b[k].indexOf(")"),q=null,r=b[k].indexOf("format(",n);0<r&&(q=c(b[k].substring(r+7,b[k].indexOf(")",r))));mxUtils.bind(this,function(a){if(null==
-f[a]){f[a]=a;d++;var c="application/x-font-ttf";if("svg"==q||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==q||"embedded-opentype"==q||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==q||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==q||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==q||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==q||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
-a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){f[a]=c;d--;m()}),mxUtils.bind(this,function(a){d--;m()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,n)),q)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,f,k,m,t,n,q,r,y,v,A,u){m=null!=m?m:!0;v=null!=v?v:this.editor.graph;A=null!=A?A:0;var c=q?null:v.background;c==mxConstants.NONE&&(c=null);null==c&&(c=f);null==c&&0==q&&
-(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(v.getSvg(c,null,null,u,null,null!=t?t:!0,null,null,null,r),mxUtils.bind(this,function(d){var g=new Image;g.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),h=parseInt(d.getAttribute("width")),l=parseInt(d.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=m?Math.min(1,Math.min(3*b/(4*l),b/h)):b/h);h=Math.ceil(n*h)+2*A;l=Math.ceil(n*l)+2*A;f.setAttribute("width",h);f.setAttribute("height",l);var p=f.getContext("2d");
-null!=c&&(p.beginPath(),p.rect(0,0,h,l),p.fillStyle=c,p.fill());p.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){p.drawImage(g,A/n,A/n);a(f)},0):(p.drawImage(g,A/n,A/n),a(f))}catch(R){null!=k&&k(R)}});g.onerror=function(a){null!=k&&k(a)};try{r&&this.editor.graph.addSvgShadow(d,d);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(v,
-d,!0,mxUtils.bind(this,function(){g.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(f)}catch(z){null!=k&&k(z)}}),d,y)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var g="http://"==c.substring(0,7)||"https://"==c.substring(0,8);g&&!navigator.onLine?c=d.svgBrokenImage.src:!g||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.isCorsEnabledForUrl(c)?"chrome-extension://"!=
+function(){f()}))}),0)):f()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=
+this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(m){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
+g=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var g=d.toDataURL("image/png"),g=this.writeGraphModelToPng(g,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(g.substring(g.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=
+b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,k,m,q){q=b.background;q==mxConstants.NONE&&(q=null);b=b.getSvg(q,null,null,null,null,m);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,f,k,m,q,n,w){w=null!=w?w:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
+try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,n):null,w)}catch(v){"Invalid image"==v.message?this.downloadFile(w):this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,m,q)}catch(y){this.spinner.stop(),this.handleError(y)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
+"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,f={},m=mxUtils.bind(this,function(){if(0==d){for(var g=[b[0]],h=1;h<b.length;h++){var l=b[h].indexOf(")");g.push('url("');g.push(f[c(b[h].substring(0,l))]);g.push('"'+b[h].substring(l))}this.editor.resolvedFontCss=g.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var n=b[k].indexOf(")"),w=null,p=b[k].indexOf("format(",n);0<p&&(w=c(b[k].substring(p+7,b[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==
+f[a]){f[a]=a;d++;var c="application/x-font-ttf";if("svg"==w||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==w||"embedded-opentype"==w||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==w||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==w||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==w||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==w||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
+a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){f[a]=c;d--;m()}),mxUtils.bind(this,function(a){d--;m()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,n)),w)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,f,k,m,q,n,p,r,y,v,A,u){m=null!=m?m:!0;v=null!=v?v:this.editor.graph;A=null!=A?A:0;var c=p?null:v.background;c==mxConstants.NONE&&(c=null);null==c&&(c=f);null==c&&0==p&&
+(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(v.getSvg(c,null,null,u,null,null!=q?q:!0,null,null,null,r),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),h=parseInt(d.getAttribute("width")),l=parseInt(d.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=m?Math.min(1,Math.min(3*b/(4*l),b/h)):b/h);h=Math.ceil(n*h)+2*A;l=Math.ceil(n*l)+2*A;g.setAttribute("width",h);g.setAttribute("height",l);var q=g.getContext("2d");
+null!=c&&(q.beginPath(),q.rect(0,0,h,l),q.fillStyle=c,q.fill());q.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(f,A/n,A/n);a(g)},0):(q.drawImage(f,A/n,A/n),a(g))}catch(T){null!=k&&k(T)}});f.onerror=function(a){null!=k&&k(a)};try{r&&this.editor.graph.addSvgShadow(d,d);var g=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(v,
+d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(g)}catch(z){null!=k&&k(z)}}),d,y)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.isCorsEnabledForUrl(c)?"chrome-extension://"!=
c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,f){null==f&&(f=this.createImageUrlConverter());var c=0,g=d||{};d=mxUtils.bind(this,function(d,h){for(var l=a.getElementsByTagName(d),m=0;m<l.length;m++)mxUtils.bind(this,function(d){var l=f.convert(d.getAttribute(h));if(null!=l&&"data:"!=l.substring(0,5)){var m=g[l];null==m?(c++,this.convertImageToDataUri(l,function(f){null!=f&&(g[l]=f,d.setAttribute(h,
-f));c--;0==c&&b(a)})):d.setAttribute(h,m)}else null!=l&&d.setAttribute(h,l)})(l[m])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,f,k,m){try{var c=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var g=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var g=Array(a.length),f=0;f<a.length;f++)g[f]=String.fromCharCode(a[f]);g=g.join("")}m=null!=m?m:"data:image/png;base64,";g=m+this.base64Encode(g)}b(g)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){k&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(w){null!=d&&d(w)}};EditorUi.prototype.isCorsEnabledForUrl=
+f));c--;0==c&&b(a)})):d.setAttribute(h,m)}else null!=l&&d.setAttribute(h,l)})(l[m])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,f,k,m){try{var c=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),g=0;g<a.length;g++)f[g]=String.fromCharCode(a[g]);f=f.join("")}m=null!=m?m:"data:image/png;base64,";f=m+this.base64Encode(f)}b(f)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){k&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(w){null!=d&&d(w)}};EditorUi.prototype.isCorsEnabledForUrl=
function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=
-function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),g=a.getContext("2d");a.height=c.height;a.width=c.width;g.drawImage(c,0,0);try{b(a.toDataURL())}catch(t){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
-function(a,b,d,f,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),l=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var p=l.getElementsByTagName("diagram");if(1==p.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(p[0]))).documentElement;else if(1<p.length){g.model.beginUpdate();try{for(a=0;a<p.length;a++){p[a].removeAttribute("id");var n=this.updatePageRoot(new DiagramPage(p[a])),
-q=this.pages.length;null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,n,n,q))}}finally{g.model.endUpdate()}}}null!=l&&"mxGraphModel"===l.nodeName&&(c=g.importGraphModel(l,b,d,f))}}catch(A){throw k||this.handleError(A,mxResources.get("invalidOrMissingFile")),A;}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f){f=null!=
-f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(f)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a,f);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType="blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{g.response.name=f,this.doImportVisio(g.response,b,d)}catch(x){d(x)}else d({})});
-g.send(c)}else try{this.doImportVisio(a,b,d)}catch(x){d(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(p){d(p)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?
-c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(g){this.handleError(g)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,
-function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{b(LucidImporter.importState(JSON.parse(a)))}catch(p){d(p)}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,
-g=null;c.getModel().beginUpdate();try{g=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(g,!0)}finally{c.getModel().endUpdate()}return g};EditorUi.prototype.insertTextAt=function(a,b,d,f,k,m,n){m=null!=m?m:!0;n=null!=n?n:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,
+function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.drawImage(c,0,0);try{b(a.toDataURL())}catch(q){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
+function(a,b,d,f,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),l=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var n=l.getElementsByTagName("diagram");if(1==n.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){g.model.beginUpdate();try{for(a=0;a<n.length;a++){n[a].removeAttribute("id");var t=this.updatePageRoot(new DiagramPage(n[a])),
+p=this.pages.length;null==t.getName()&&t.setName(mxResources.get("pageWithNumber",[p+1]));g.model.execute(new ChangePage(this,t,t,p))}}finally{g.model.endUpdate()}}}null!=l&&"mxGraphModel"===l.nodeName&&(c=g.importGraphModel(l,b,d,f))}}catch(A){if(k)throw A;this.handleError(A)}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,
+function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(f)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a,f);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType="blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{g.response.name=f,this.doImportVisio(g.response,b,d)}catch(x){d(x)}else d({})});g.send(c)}else try{this.doImportVisio(a,
+b,d)}catch(x){d(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(t){d(t)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
+c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{b(LucidImporter.importState(JSON.parse(a)))}catch(t){d(t)}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,
+f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,f,k,m,q){m=null!=m?m:!0;q=null!=q?q:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,
function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var g=this.extractGraphModelFromPng(a),h=this.importXml(g,b,d,m,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(g=null,"data:image/svg+xml;base64,"==a.substring(0,
-26)?(g=a.substring(a.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(a.substring(a.indexOf(",")+1)),h=this.importXml(g,b,d,m,!0),0<h.length)return h}catch(y){}this.loadImage(a,mxUtils.bind(this,function(g){if("data:"==a.substring(0,5))this.resizeImage(g,a,mxUtils.bind(this,function(a,g,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-this.convertDataUri(a)+";"))}),n,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/g.width,this.maxImageSize/g.height)),h=Math.round(g.width*f);g=Math.round(g.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),h,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var g=null;c.getModel().beginUpdate();try{g=c.insertVertex(c.getDefaultParent(),
+26)?(g=a.substring(a.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(a.substring(a.indexOf(",")+1)),h=this.importXml(g,b,d,m,!0),0<h.length)return h}catch(y){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,g){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(a)+";"))}),q,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),h=Math.round(f.width*g);f=Math.round(f.height*g);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),h,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var g=null;c.getModel().beginUpdate();try{g=c.insertVertex(c.getDefaultParent(),
null,a,c.snap(b),c.snap(d),1,1,"text;"+(f?"html=1;":"")),c.updateCellSize(g),c.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{c.getModel().endUpdate()}c.setSelectionCell(g)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,m);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,m))}),mxUtils.bind(this,function(a){this.handleError(a)}));
else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(f?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[k])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),k.value=a,c.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(k.value)&&
c.setLinkForCell(k,k.value),k.geometry.width+=c.gridSize,k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&'{"state":"{\\"Properties\\":'==a.substring(0,26)};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&
this.importFiles(c.files,null,null,this.maxImageSize)}));c.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a)}),
-null,c)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var g=this.dialog,f=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(g,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,f,k,m,n,q,r,u,y){u=null!=u?u:!0;var c=!1,g=null,h=mxUtils.bind(this,function(a){var b=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,n)):b=this.importXml(a,d,f,u);null!=q&&q(b)});"image"==b.substring(0,5)?(r=!1,"image/png"==b.substring(0,9)&&(b=y?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,d,f,u),r=!0)),r||(g=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&g.isGridEnabled()&&(d=g.snap(d),f=g.snap(f)),g=[g.insertVertex(null,null,"",d,f,k,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,h)):null!=r&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?(c=!0,this.importVisio(r,h)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,n)?(c=!0,this.parseFile(null!=r?r:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(a.responseText):null!=q&&q(null))}),n)):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||
-(g=this.insertTextAt(this.validateFileData(a),d,f,!0,null,u));c||null==q||q(g);return g};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,k,n;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}k=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);
-b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);b+="=";break}n=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(n&192)>>6);b+=
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,f,k,m,n,q,r,u,y,v){b=null!=b?b:0;d=null!=d?d:0;f=null!=f?f:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,g=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var l=y||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>l){h=!0;break}var t=mxUtils.bind(this,function(){var h=this.editor.graph,l=h.gridSize;
-k=null!=k?k:mxUtils.bind(this,function(a,b,d,f,g,h,l,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,d,f,g,h,l,k,m,c,v)});m=null!=m?m:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,t=p,r=[],w=mxUtils.bind(this,function(a,b){r[a]=b;if(0==--t){this.spinner.stop();if(null!=q)q(r);else{var c=[];h.getModel().beginUpdate();
-try{for(var d=0;d<r.length;d++){var f=r[d]();null!=f&&(c=c.concat(f))}}finally{h.getModel().endUpdate()}}m(c)}}),x=0;x<p;x++)mxUtils.bind(this,function(c){var m=a[c],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==n||n(m))if("image/"==m.type.substring(0,6))if("image/svg"==m.type.substring(0,9)){var p=a.target.result,t=p.indexOf(","),q=decodeURIComponent(escape(atob(p.substring(t+1)))),r=mxUtils.parseXml(q),q=r.getElementsByTagName("svg");if(0<q.length){var q=q[0],z=v?null:q.getAttribute("content");
-null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(p.substring(0,t+1),null!=r){var a=r.getElementsByTagName("svg");if(0<a.length){var g=a[0],n=parseFloat(g.getAttribute("width")),q=parseFloat(g.getAttribute("height")),v=g.getAttribute("viewBox");if(null==v||0==v.length)g.setAttribute("viewBox",
-"0 0 "+n+" "+q);else if(isNaN(n)||isNaN(q)){var w=v.split(" ");3<w.length&&(n=parseFloat(w[2]),q=parseFloat(w[3]))}p=this.createSvgDataUri(mxUtils.getXml(g));var z=Math.min(1,Math.min(f/Math.max(1,n)),f/Math.max(1,q)),x=k(p,m.type,b+c*l,d+c*l,Math.max(1,Math.round(n*z)),Math.max(1,Math.round(q*z)),m.name);if(isNaN(n)||isNaN(q)){var u=new Image;u.onload=mxUtils.bind(this,function(){n=Math.max(1,u.width);q=Math.max(1,u.height);x[0].geometry.width=n;x[0].geometry.height=q;g.setAttribute("viewBox","0 0 "+
-n+" "+q);p=this.createSvgDataUri(mxUtils.getXml(g));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));h.setCellStyles("image",p,[x[0]])});u.src=this.createSvgDataUri(mxUtils.getXml(g))}return x}}}catch(sa){}return null})):w(c,mxUtils.bind(this,function(){return k(z,"text/xml",b+c*l,d+c*l,0,0,m.name)}))}else w(c,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==m.type){var x=v?null:this.extractGraphModelFromPng(a.target.result);if(null!=x&&0<x.length){var J=
-new Image;J.src=a.target.result;w(c,mxUtils.bind(this,function(){return k(x,"text/xml",b+c*l,d+c*l,J.width,J.height,m.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,
-mxUtils.bind(this,function(h,n,p){w(c,mxUtils.bind(this,function(){if(null!=h&&h.length<u){var t=g&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(f/n,f/p)):1;return k(h,m.type,b+c*l,d+c*l,Math.round(n*t),Math.round(p*t),m.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,f,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,m.type,b+c*l,d+c*l,240,160,m.name,function(a){w(c,
-function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(m.name)||/(\.vs(x|sx?))($|\?)/i.test(m.name)?k(null,m.type,b+c*l,d+c*l,240,160,m.name,function(a){w(c,function(){return a})},m):"image"==m.type.substring(0,5)?p.readAsDataURL(m):p.readAsText(m)})(x)});h?this.confirmImageResize(function(a){g=a;t()},r):t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
+null,c)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;g.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,f,k,m,q,n,p,r,u){r=null!=r?r:!0;var c=!1,g=null,h=mxUtils.bind(this,function(a){var c=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,q)):c=this.importXml(a,d,f,r);null!=n&&n(c)});"image"==b.substring(0,5)?(p=!1,"image/png"==b.substring(0,9)&&(b=u?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,d,f,r),p=!0)),p||(g=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),r&&g.isGridEnabled()&&(d=g.snap(d),f=g.snap(f)),g=[g.insertVertex(null,null,"",d,f,k,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,h)):null!=p&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?(c=!0,this.importVisio(p,h)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,q)?(c=!0,this.parseFile(null!=p?p:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(a.responseText):null!=n&&n(null))}),q)):/(\.v(sd|dx))($|\?)/i.test(q)||/(\.vs(s|x))($|\?)/i.test(q)||
+(g=this.insertTextAt(this.validateFileData(a),d,f,!0,null,r));c||null==n||n(g);return g};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,k,q;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}k=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);
+b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);b+="=";break}q=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(q&192)>>6);b+=
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(q&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,f,k,m,q,n,p,r,u,v){b=null!=b?b:0;d=null!=d?d:0;f=null!=f?f:this.maxImageSize;r=null!=r?r:this.maxImageBytes;var c=null!=b&&null!=d,g=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var l=u||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>l){h=!0;break}var w=mxUtils.bind(this,function(){var h=this.editor.graph,l=h.gridSize;
+k=null!=k?k:mxUtils.bind(this,function(a,b,d,f,g,h,l,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,d,f,g,h,l,k,m,c,v)});m=null!=m?m:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,p=t,w=[],x=mxUtils.bind(this,function(a,b){w[a]=b;if(0==--p){this.spinner.stop();if(null!=n)n(w);else{var c=[];h.getModel().beginUpdate();
+try{for(var d=0;d<w.length;d++){var f=w[d]();null!=f&&(c=c.concat(f))}}finally{h.getModel().endUpdate()}}m(c)}}),A=0;A<t;A++)mxUtils.bind(this,function(c){var m=a[c],n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==q||q(m))if("image/"==m.type.substring(0,6))if("image/svg"==m.type.substring(0,9)){var n=a.target.result,t=n.indexOf(","),p=decodeURIComponent(escape(atob(n.substring(t+1)))),w=mxUtils.parseXml(p),p=w.getElementsByTagName("svg");if(0<p.length){var p=p[0],z=v?null:p.getAttribute("content");
+null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?x(c,mxUtils.bind(this,function(){try{if(n.substring(0,t+1),null!=w){var a=w.getElementsByTagName("svg");if(0<a.length){var g=a[0],q=parseFloat(g.getAttribute("width")),p=parseFloat(g.getAttribute("height")),v=g.getAttribute("viewBox");if(null==v||0==v.length)g.setAttribute("viewBox",
+"0 0 "+q+" "+p);else if(isNaN(q)||isNaN(p)){var r=v.split(" ");3<r.length&&(q=parseFloat(r[2]),p=parseFloat(r[3]))}n=this.createSvgDataUri(mxUtils.getXml(g));var z=Math.min(1,Math.min(f/Math.max(1,q)),f/Math.max(1,p)),x=k(n,m.type,b+c*l,d+c*l,Math.max(1,Math.round(q*z)),Math.max(1,Math.round(p*z)),m.name);if(isNaN(q)||isNaN(p)){var u=new Image;u.onload=mxUtils.bind(this,function(){q=Math.max(1,u.width);p=Math.max(1,u.height);x[0].geometry.width=q;x[0].geometry.height=p;g.setAttribute("viewBox","0 0 "+
+q+" "+p);n=this.createSvgDataUri(mxUtils.getXml(g));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));h.setCellStyles("image",n,[x[0]])});u.src=this.createSvgDataUri(mxUtils.getXml(g))}return x}}}catch(sa){}return null})):x(c,mxUtils.bind(this,function(){return k(z,"text/xml",b+c*l,d+c*l,0,0,m.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==m.type){var A=v?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var K=
+new Image;K.src=a.target.result;x(c,mxUtils.bind(this,function(){return k(A,"text/xml",b+c*l,d+c*l,K.width,K.height,m.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,
+mxUtils.bind(this,function(h,q,n){x(c,mxUtils.bind(this,function(){if(null!=h&&h.length<r){var p=g&&this.isResampleImage(a.target.result,u)?Math.min(1,Math.min(f/q,f/n)):1;return k(h,m.type,b+c*l,d+c*l,Math.round(q*p),Math.round(n*p),m.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,f,u)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,m.type,b+c*l,d+c*l,240,160,m.name,function(a){x(c,
+function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(m.name)||/(\.vs(x|sx?))($|\?)/i.test(m.name)?k(null,m.type,b+c*l,d+c*l,240,160,m.name,function(a){x(c,function(){return a})},m):"image"==m.type.substring(0,5)?n.readAsDataURL(m):n.readAsText(m)})(A)});h?this.confirmImageResize(function(a){g=a;w()},p):w()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||
mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,f,k,m){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),g=Math.max(1,a.height);
-if(f&&this.isResampleImage(b,m))try{var h=Math.max(c/k,g/k);if(1<h){var l=Math.round(c/h),n=Math.round(g/h),p=document.createElement("canvas");p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var q=p.toDataURL();if(q.length<b.length){var r=document.createElement("canvas");r.width=l;r.height=n;var u=r.toDataURL();q!==u&&(b=q,c=l,g=n)}}}catch(E){}d(b,c,g)};EditorUi.prototype.crcTable=[];for(var f=0;256>f;f++)for(var d=f,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[f]=
+if(f&&this.isResampleImage(b,m))try{var h=Math.max(c/k,g/k);if(1<h){var l=Math.round(c/h),n=Math.round(g/h),p=document.createElement("canvas");p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var t=p.toDataURL();if(t.length<b.length){var r=document.createElement("canvas");r.width=l;r.height=n;var u=r.toDataURL();t!==u&&(b=t,c=l,g=n)}}}catch(F){}d(b,c,g)};EditorUi.prototype.crcTable=[];for(var f=0;256>f;f++)for(var d=f,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[f]=
d;EditorUi.prototype.updateCRC=function(a,b,d,f){for(var c=0;c<f;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,f,k){function c(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<
16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(c(a,4),"IHDR"!=c(a,4))null!=k&&k();else{c(a,17);k=a.substring(0,l);do{var n=g(a);if("IDAT"==c(a,4)){k=a.substring(0,l-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;f=this.updateCRC(f,
b,0,4);f=this.updateCRC(f,d,0,d.length);k+=h(d.length)+b+d+h(f^4294967295);k+=a.substring(l-8,a.length);break}k+=a.substring(l-8,l-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),
-"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(p){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=
+"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(t){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=
d);c.src=a};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(z){a.handleError(z)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var f=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return f.apply(this,arguments)};
var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};k.call(this,a,c,d)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:m.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))t.apply(this,
-arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var q=this.actions.get("print");q.setEnabled(!mxClient.IS_IOS||!navigator.standalone);q.visible=q.isEnabled();if(!this.editor.chromeless||this.editor.editable){var r=function(){window.setTimeout(function(){u.innerHTML="&nbsp;";
+360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:m.apply(this,arguments)};var q=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))q.apply(this,
+arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var r=function(){window.setTimeout(function(){u.innerHTML="&nbsp;";
u.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var g=c.items;for(index in g){var h=g[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,g,h){b.insertImage(a,g,h)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var l=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],l.x,l.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(U){}}),!1);var u=document.createElement("div");u.style.position="absolute";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.display="block";u.contentEditable=!0;mxUtils.setOpacity(u,0);u.style.width="1px";u.style.height="1px";u.innerHTML="&nbsp;";var y=!1;this.keyHandler.bindControlKey(88,null);
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(V){}}),!1);var u=document.createElement("div");u.style.position="absolute";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.display="block";u.contentEditable=!0;mxUtils.setOpacity(u,0);u.style.width="1px";u.style.height="1px";u.innerHTML="&nbsp;";var y=!1;this.keyHandler.bindControlKey(88,null);
this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||y||(u.style.left=b.container.scrollLeft+10+"px",u.style.top=b.container.scrollTop+10+"px",b.container.appendChild(u),
y=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){u.focus();document.execCommand("selectAll",!1,null)},0):(u.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!y||224!=c&&17!=c&&91!=c||(y=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),u.parentNode.removeChild(u),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(u,
"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(u),r())}));mxEvent.addListener(u,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(u,!0),r())}));mxEvent.addListener(u,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u.innerHTML="&nbsp;",u.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,u);u.innerHTML="&nbsp;"}),0))}),!0);var v=this.isSelectionAllowed;this.isSelectionAllowed=
function(a){return mxEvent.getSource(a)==u?!0:v.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,g,h){b.insertImage(a,g,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
-mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){q=document.createElement("div");q.style.position="absolute";q.style.top="95px";q.style.left="250px";q.style.width="2000px";q.style.height="30px";q.style.background=
-"whiteSmoke";document.body.appendChild(q);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var F=document.createElement("div");F.style.position="absolute";F.style.top="95px";F.style.left="220px";F.style.width="30px";F.style.height="30px";F.style.background="whiteSmoke";document.body.appendChild(F);this.vRuler=new mxRuler(this.editor.graph,
-A,!0);this.hRuler=new mxRuler(this.editor.graph,q,!1)}if("1"==urlParams.styledev){q=document.getElementById("geFooter");null!=q&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,
-function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),q.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var P=this.isSelectionAllowed;
-this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:P.apply(this,arguments)}}q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
-E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,g=c.x/f-d.x,h=c.y/f-d.y;mxEvent.isAltDown(a)&&(h=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
-g,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,g,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var m=null,d=c.getElementsByTagName("img");
-null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,g,h,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,
-function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",g,h,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,g,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
+mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){p=document.createElement("div");p.style.position="absolute";p.style.top="95px";p.style.left="250px";p.style.width="2000px";p.style.height="30px";p.style.background=
+"whiteSmoke";document.body.appendChild(p);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var G=document.createElement("div");G.style.position="absolute";G.style.top="95px";G.style.left="220px";G.style.width="30px";G.style.height="30px";G.style.background="whiteSmoke";document.body.appendChild(G);this.vRuler=new mxRuler(this.editor.graph,
+A,!0);this.hRuler=new mxRuler(this.editor.graph,p,!1)}if("1"==urlParams.styledev){p=document.getElementById("geFooter");null!=p&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,
+function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var Q=this.isSelectionAllowed;
+this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:Q.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var F=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),F=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
+F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=F&&(F.parentNode.removeChild(F),F=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,g=c.x/f-d.x,h=c.y/f-d.y;mxEvent.isAltDown(a)&&(h=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+g,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,g,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var m=null,d=c.getElementsByTagName("img");
+null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var q=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,g,h,!0,m,null,q))});m&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){q=a;n()},mxEvent.isControlDown(a)):n()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,
+function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",g,h,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,g,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
g,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();this.editUpdateListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");null!=c&&this.updateEditReferences(c)});this.editor.undoManager.addListener(mxEvent.BEFORE_UNDO,this.editUpdateListener);this.editor.undoManager.addListener(mxEvent.BEFORE_REDO,this.editUpdateListener);"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,
arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};
EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
@@ -3103,8 +3123,8 @@ k.style.top=b+"px";k.style.left=c+"px";k.style.width=Math.max(0,d-3)+"px";k.styl
c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&(f=f.substring(0,f.length-4)+".xml");var g=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".xml":f+".xml";if("<mxlibrary"==
a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();g(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();
g(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?g(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".xml"),this.convertLucidChart(d,
-mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,
-9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}}catch(D){this.handleError(D)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&
+mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,
+9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}}catch(E){this.handleError(E)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&
this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=
new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,
a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));
@@ -3114,21 +3134,21 @@ this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop()
window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,k=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var h=g.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
-(a=this.editor.graph.decompress(a)))}catch(N){}return a});if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(J){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();k=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?
+(a=this.editor.graph.decompress(a)))}catch(O){}return a});if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(K){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();k=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?
mxResources.get(h.okKey):null,function(a){null!=a&&n.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==h.action){var l=k(h.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),
-mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(J){n.postMessage(JSON.stringify({event:"draft",
-error:J.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();k=1==h.enableRecent;l=1==h.enableSearch;k=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,k?mxUtils.bind(this,function(a){this.recentReadyCallback=
+mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(K){n.postMessage(JSON.stringify({event:"draft",
+error:K.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();k=1==h.enableRecent;l=1==h.enableSearch;k=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,k?mxUtils.bind(this,function(a){this.recentReadyCallback=
a;n.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;n.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){n.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("searchDocsList"==h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==
-h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("textContent"==h.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,k="";if(null!=this.pages)for(l=0;l<this.pages.length;l++){var t=m;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(m.getStylesheet()),t.model.setRoot(this.pages[l].root));k+=this.pages[l].getName()+" "+t.getIndexableText()+" "}else k=m.getIndexableText();this.editor.graph.setEnabled(!0);n.postMessage(JSON.stringify({event:"textContent",data:k,
-message:h}),"*");return}if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var q=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,q):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==
-h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var p=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(p);n.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);r(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),x=m.getGlobalVariable,z=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(m.container);
-m.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
-h.xml&&0<h.xml.length&&this.setFileData(h.xml);q=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),q.xml=mxUtils.getXml(k),q.data=this.getFileData(null,null,!0,null,null,null,k),q.format=h.format;else if("html"==h.format)p=this.editor.getGraphXml(),q.data=this.getHtml(p,this.editor.graph),q.xml=mxUtils.getXml(p),q.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;
-k==mxConstants.NONE&&(k=null);q.xml=this.getFileData(!0);q.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(q.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(a);n.postMessage(JSON.stringify(q),"*")})):this.convertImages(this.editor.graph.getSvg(k),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(mxUtils.getXml(a));n.postMessage(JSON.stringify(q),"*")}));return}k="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));q.data=this.createSvgDataUri(k)}n.postMessage(JSON.stringify(q),"*")}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=
+h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("textContent"==h.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,k="";if(null!=this.pages)for(l=0;l<this.pages.length;l++){var q=m;this.currentPage!=this.pages[l]&&(q=this.createTemporaryGraph(m.getStylesheet()),q.model.setRoot(this.pages[l].root));k+=this.pages[l].getName()+" "+q.getIndexableText()+" "}else k=m.getIndexableText();this.editor.graph.setEnabled(!0);n.postMessage(JSON.stringify({event:"textContent",data:k,
+message:h}),"*");return}if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var p=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==
+h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var r=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(r);n.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(r))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),x=m.getGlobalVariable,z=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(m.container);
+m.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(r)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
+h.xml&&0<h.xml.length&&this.setFileData(h.xml);p=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),p.xml=mxUtils.getXml(k),p.data=this.getFileData(null,null,!0,null,null,null,k),p.format=h.format;else if("html"==h.format)r=this.editor.getGraphXml(),p.data=this.getHtml(r,this.editor.graph),p.xml=mxUtils.getXml(r),p.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;
+k==mxConstants.NONE&&(k=null);p.xml=this.getFileData(!0);p.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);n.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(k),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));n.postMessage(JSON.stringify(p),"*")}));return}k="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));p.data=this.createSvgDataUri(k)}n.postMessage(JSON.stringify(p),"*")}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=
h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):h.xml;else{n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}var B=mxUtils.bind(this,function(g,h){c=!0;try{a(g,h)}catch(V){this.handleError(V)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});
+this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):h.xml;else{n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}var B=mxUtils.bind(this,function(g,h){c=!0;try{a(g,h)}catch(W){this.handleError(W)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});
f=k();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=k();if(d!=f&&!c){var g=this.createLoadMessage("autosave");g.xml=d;d=JSON.stringify(g);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",
b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||n.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=h&&"function"===typeof h.substring&&"data:application/vnd.visio;base64,"==h.substring(0,34)?(k="0M8R4KGxGuE"==h.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(h.substring(h.indexOf(",")+
1)),function(a){B(a,g)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=h&&"function"===typeof h.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(h,"")?this.parseFile(new Blob([h],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&B(a.responseText,g)}),""):null!=h&&"function"===typeof h.substring&&this.isLucidChartData(h)?this.convertLucidChart(h,
@@ -3136,19 +3156,19 @@ mxUtils.bind(this,function(a){B(a)}),mxUtils.bind(this,function(a){this.handleEr
"2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,
-640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var f={},g=null,k=null,n=null,q=null,r="",u="auto",v="auto",A=null,F=null,P=40,E=40,H=100,L=0,z=this.editor.graph;z.getGraphBounds();for(var B=function(){null!=b?b(ea):(z.setSelectionCells(ea),z.scrollCellToVisible(z.getSelectionCell()))},J=z.getFreeInsertPoint(),N=J.x,R=J.y,J=R,V=null,U="auto",q=null,I=[],ha=null,na=null,X=0;X<c.length&&"#"==c[X].charAt(0);){a=c[X];for(X++;X<
-c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[X].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[X].substring(1)),X++;if("#"!=a.charAt(1)){var aa=a.indexOf(":");if(0<aa){var M=mxUtils.trim(a.substring(1,aa)),G=mxUtils.trim(a.substring(aa+1));"label"==M?V=z.sanitizeHtml(G):"style"==M?g=G:"parentstyle"==M?k=G:"identity"==M&&0<G.length&&"-"!=G?n=G:"parent"==M&&0<G.length&&"-"!=G?q=G:"namespace"==M&&0<G.length&&"-"!=G?r=G:"width"==M?u=G:"height"==M?v=G:"left"==M&&0<G.length?A=G:"top"==M&&0<G.length?
-F=G:"ignore"==M?na=G.split(","):"connect"==M?I.push(JSON.parse(G)):"link"==M?ha=G:"padding"==M?L=parseFloat(G):"edgespacing"==M?P=parseFloat(G):"nodespacing"==M?E=parseFloat(G):"levelspacing"==M?H=parseFloat(G):"layout"==M&&(U=G)}}}var T=this.editor.csvToArray(c[X]),M=aa=null;if(null!=n||null!=q)for(var K=0;K<T.length;K++)n==T[K]&&(aa=K),q==T[K]&&(M=K);null==V&&(V="%"+T[0]+"%");if(null!=I)for(var O=0;O<I.length;O++)null==f[I[O].to]&&(f[I[O].to]={});z.model.beginUpdate();try{for(K=X+1;K<c.length;K++){var S=
-this.editor.csvToArray(c[K]);if(null==S){var ja=40<c[K].length?c[K].substring(0,40)+"...":c[K];throw Error(K+" ("+ja+") "+mxResources.get("containsValidationErrors"));}if(S.length==T.length){var C=null,da=null!=aa?r+S[aa]:null;null!=da&&(C=z.model.getCell(da));null==C&&(C=new mxCell(V,new mxGeometry(N,J,0,0),g||"whiteSpace=wrap;html=1;"),C.vertex=!0,C.id=da);for(var W=0;W<S.length;W++)z.setAttributeForCell(C,T[W],S[W]);z.setAttributeForCell(C,"placeholders","1");C.style=z.replacePlaceholders(C,C.style);
-for(O=0;O<I.length;O++)f[I[O].to][C.getAttribute(I[O].to)]=C;null!=ha&&"link"!=ha&&(z.setLinkForCell(C,C.getAttribute(ha)),z.setAttributeForCell(C,ha,null));z.fireEvent(new mxEventObject("cellsInserted","cells",[C]));var Y=this.editor.graph.getPreferredSizeForCell(C);C.vertex&&(null!=A&&null!=C.getAttribute(A)&&(C.geometry.x=N+parseFloat(C.getAttribute(A))),null!=F&&null!=C.getAttribute(F)&&(C.geometry.y=R+parseFloat(C.getAttribute(F))),"@"==u.charAt(0)&&null!=C.getAttribute(u.substring(1))?C.geometry.width=
-parseFloat(C.getAttribute(u.substring(1))):C.geometry.width="auto"==u?Y.width+L:parseFloat(u),"@"==v.charAt(0)&&null!=C.getAttribute(v.substring(1))?C.geometry.height=parseFloat(C.getAttribute(v.substring(1))):C.geometry.height="auto"==v?Y.height+L:parseFloat(v),J+=C.geometry.height+E);q=null!=M?z.model.getCell(r+S[M]):null;null!=q?(q.style=z.replacePlaceholders(q,k),z.addCell(C,q)):d.push(z.addCell(C))}}for(var ba=d.slice(),ea=d.slice(),O=0;O<I.length;O++)for(var Z=I[O],K=0;K<d.length;K++){var C=
-d[K],qa=C.getAttribute(Z.from);if(null!=qa){z.setAttributeForCell(C,Z.from,null);for(var sa=qa.split(","),W=0;W<sa.length;W++){var la=f[Z.to][sa[W]];null!=la&&(V=Z.label,null!=Z.fromlabel&&(V=(C.getAttribute(Z.fromlabel)||"")+(V||"")),null!=Z.tolabel&&(V=(V||"")+(la.getAttribute(Z.tolabel)||"")),ea.push(z.insertEdge(null,null,V||"",Z.invert?la:C,Z.invert?C:la,Z.style||z.createCurrentEdgeStyle())),mxUtils.remove(Z.invert?C:la,ba))}}}if(null!=na)for(K=0;K<d.length;K++)for(C=d[K],W=0;W<na.length;W++)z.setAttributeForCell(C,
-mxUtils.trim(na[W]),null);var oa=new mxParallelEdgeLayout(z);oa.spacing=P;var va=function(){oa.execute(z.getDefaultParent());for(var a=0;a<d.length;a++){var b=z.getCellGeometry(d[a]);b.x=Math.round(z.snap(b.x));b.y=Math.round(z.snap(b.y));"auto"==u&&(b.width=Math.round(z.snap(b.width)));"auto"==v&&(b.height=Math.round(z.snap(b.height)))}};if("circle"==U){var ka=new mxCircleLayout(z);ka.resetEdges=!1;var ta=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return ta.apply(this,arguments)||0>mxUtils.indexOf(d,
-a)};this.executeLayout(function(){ka.execute(z.getDefaultParent());va()},!0,B);B=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&ea.length==2*d.length-1&&1==ba.length){z.view.validate();var ia=new mxCompactTreeLayout(z,"horizontaltree"==U);ia.levelDistance=E;ia.edgeRouting=!1;ia.resetEdges=!1;this.executeLayout(function(){ia.execute(z.getDefaultParent(),0<ba.length?ba[0]:null)},!0,B);B=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==ba.length){z.view.validate();
-var fa=new mxHierarchicalLayout(z,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fa.intraCellSpacing=E;fa.parallelEdgeSpacing=P;fa.interRankCellSpacing=H;fa.disableEdgeStyle=!1;this.executeLayout(function(){fa.execute(z.getDefaultParent(),ea);z.moveCells(ea,N,R)},!0,B);B=null}else if("organic"==U||"auto"==U&&ea.length>d.length){z.view.validate();var ca=new mxFastOrganicLayout(z);ca.forceConstant=3*E;ca.resetEdges=!1;var ya=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return ya.apply(this,
-arguments)||0>mxUtils.indexOf(d,a)};oa=new mxParallelEdgeLayout(z);oa.spacing=P;this.executeLayout(function(){ca.execute(z.getDefaultParent());va()},!0,B);B=null}this.hideDialog()}finally{z.model.endUpdate()}null!=B&&B()}}catch(wa){this.handleError(wa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=
+640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var f={},g=null,k=null,n=null,p=null,r="",u="auto",v="auto",A=null,G=null,Q=40,F=40,I=100,M=0,z=this.editor.graph;z.getGraphBounds();for(var B=function(){null!=b?b(fa):(z.setSelectionCells(fa),z.scrollCellToVisible(z.getSelectionCell()))},K=z.getFreeInsertPoint(),O=K.x,T=K.y,K=T,W=null,V="auto",p=null,J=[],ha=null,na=null,Y=0;Y<c.length&&"#"==c[Y].charAt(0);){a=c[Y];for(Y++;Y<
+c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Y].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Y].substring(1)),Y++;if("#"!=a.charAt(1)){var ba=a.indexOf(":");if(0<ba){var N=mxUtils.trim(a.substring(1,ba)),H=mxUtils.trim(a.substring(ba+1));"label"==N?W=z.sanitizeHtml(H):"style"==N?g=H:"parentstyle"==N?k=H:"identity"==N&&0<H.length&&"-"!=H?n=H:"parent"==N&&0<H.length&&"-"!=H?p=H:"namespace"==N&&0<H.length&&"-"!=H?r=H:"width"==N?u=H:"height"==N?v=H:"left"==N&&0<H.length?A=H:"top"==N&&0<H.length?
+G=H:"ignore"==N?na=H.split(","):"connect"==N?J.push(JSON.parse(H)):"link"==N?ha=H:"padding"==N?M=parseFloat(H):"edgespacing"==N?Q=parseFloat(H):"nodespacing"==N?F=parseFloat(H):"levelspacing"==N?I=parseFloat(H):"layout"==N&&(V=H)}}}var U=this.editor.csvToArray(c[Y]),N=ba=null;if(null!=n||null!=p)for(var L=0;L<U.length;L++)n==U[L]&&(ba=L),p==U[L]&&(N=L);null==W&&(W="%"+U[0]+"%");if(null!=J)for(var P=0;P<J.length;P++)null==f[J[P].to]&&(f[J[P].to]={});z.model.beginUpdate();try{for(L=Y+1;L<c.length;L++){var R=
+this.editor.csvToArray(c[L]);if(null==R){var ja=40<c[L].length?c[L].substring(0,40)+"...":c[L];throw Error(L+" ("+ja+") "+mxResources.get("containsValidationErrors"));}if(R.length==U.length){var D=null,ea=null!=ba?r+R[ba]:null;null!=ea&&(D=z.model.getCell(ea));null==D&&(D=new mxCell(W,new mxGeometry(O,K,0,0),g||"whiteSpace=wrap;html=1;"),D.vertex=!0,D.id=ea);for(var X=0;X<R.length;X++)z.setAttributeForCell(D,U[X],R[X]);z.setAttributeForCell(D,"placeholders","1");D.style=z.replacePlaceholders(D,D.style);
+for(P=0;P<J.length;P++)f[J[P].to][D.getAttribute(J[P].to)]=D;null!=ha&&"link"!=ha&&(z.setLinkForCell(D,D.getAttribute(ha)),z.setAttributeForCell(D,ha,null));z.fireEvent(new mxEventObject("cellsInserted","cells",[D]));var Z=this.editor.graph.getPreferredSizeForCell(D);D.vertex&&(null!=A&&null!=D.getAttribute(A)&&(D.geometry.x=O+parseFloat(D.getAttribute(A))),null!=G&&null!=D.getAttribute(G)&&(D.geometry.y=T+parseFloat(D.getAttribute(G))),"@"==u.charAt(0)&&null!=D.getAttribute(u.substring(1))?D.geometry.width=
+parseFloat(D.getAttribute(u.substring(1))):D.geometry.width="auto"==u?Z.width+M:parseFloat(u),"@"==v.charAt(0)&&null!=D.getAttribute(v.substring(1))?D.geometry.height=parseFloat(D.getAttribute(v.substring(1))):D.geometry.height="auto"==v?Z.height+M:parseFloat(v),K+=D.geometry.height+F);p=null!=N?z.model.getCell(r+R[N]):null;null!=p?(p.style=z.replacePlaceholders(p,k),z.addCell(D,p)):d.push(z.addCell(D))}}for(var ca=d.slice(),fa=d.slice(),P=0;P<J.length;P++)for(var aa=J[P],L=0;L<d.length;L++){var D=
+d[L],qa=D.getAttribute(aa.from);if(null!=qa){z.setAttributeForCell(D,aa.from,null);for(var sa=qa.split(","),X=0;X<sa.length;X++){var la=f[aa.to][sa[X]];null!=la&&(W=aa.label,null!=aa.fromlabel&&(W=(D.getAttribute(aa.fromlabel)||"")+(W||"")),null!=aa.tolabel&&(W=(W||"")+(la.getAttribute(aa.tolabel)||"")),fa.push(z.insertEdge(null,null,W||"",aa.invert?la:D,aa.invert?D:la,aa.style||z.createCurrentEdgeStyle())),mxUtils.remove(aa.invert?D:la,ca))}}}if(null!=na)for(L=0;L<d.length;L++)for(D=d[L],X=0;X<na.length;X++)z.setAttributeForCell(D,
+mxUtils.trim(na[X]),null);var oa=new mxParallelEdgeLayout(z);oa.spacing=Q;var va=function(){oa.execute(z.getDefaultParent());for(var a=0;a<d.length;a++){var b=z.getCellGeometry(d[a]);b.x=Math.round(z.snap(b.x));b.y=Math.round(z.snap(b.y));"auto"==u&&(b.width=Math.round(z.snap(b.width)));"auto"==v&&(b.height=Math.round(z.snap(b.height)))}};if("circle"==V){var ka=new mxCircleLayout(z);ka.resetEdges=!1;var ta=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return ta.apply(this,arguments)||0>mxUtils.indexOf(d,
+a)};this.executeLayout(function(){ka.execute(z.getDefaultParent());va()},!0,B);B=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&fa.length==2*d.length-1&&1==ca.length){z.view.validate();var ia=new mxCompactTreeLayout(z,"horizontaltree"==V);ia.levelDistance=F;ia.edgeRouting=!1;ia.resetEdges=!1;this.executeLayout(function(){ia.execute(z.getDefaultParent(),0<ca.length?ca[0]:null)},!0,B);B=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==ca.length){z.view.validate();
+var ga=new mxHierarchicalLayout(z,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=F;ga.parallelEdgeSpacing=Q;ga.interRankCellSpacing=I;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(z.getDefaultParent(),fa);z.moveCells(fa,O,T)},!0,B);B=null}else if("organic"==V||"auto"==V&&fa.length>d.length){z.view.validate();var da=new mxFastOrganicLayout(z);da.forceConstant=3*F;da.resetEdges=!1;var ya=da.isVertexIgnored;da.isVertexIgnored=function(a){return ya.apply(this,
+arguments)||0>mxUtils.indexOf(d,a)};oa=new mxParallelEdgeLayout(z);oa.spacing=Q;this.executeLayout(function(){da.execute(z.getDefaultParent());va()},!0,B);B=null}this.hideDialog()}finally{z.model.endUpdate()}null!=B&&B()}}catch(wa){this.handleError(wa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=
window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,
-!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var q=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=q.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-
+!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-
2*a.y/b))}return d.apply(this,arguments)};var f=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return f.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=
this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var k=b.init;b.init=function(){k.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+
a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),f=b.source,g=b.outline;g.pageScale=f.pageScale;g.pageFormat=f.pageFormat;g.background=f.background;g.pageVisible=f.pageVisible;g.background=f.background;var h=mxUtils.getCurrentStyle(f.container);g.container.style.backgroundColor=h.backgroundColor;null!=f.view.backgroundPageShape&&
@@ -3164,8 +3184,8 @@ EditorUi.prototype.updateActionStates=function(){r.apply(this,arguments);var a=t
this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));
this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);
this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);u.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,f,k,m){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(f,k,m)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),n=Math.floor(h.width*k/c.view.scale),
-l=Math.floor(h.height*k/c.view.scale);g.length<=MAX_REQUEST_SIZE&&n*l<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=f?f:"none")+"&w="+n+"&h="+l+"&border="+m+"&xml="+encodeURIComponent(g))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
+this.exportDialog=null);u.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,f,k,m){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(f,k,m)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),l=Math.floor(h.width*k/c.view.scale),
+n=Math.floor(h.height*k/c.view.scale);g.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=f?f:"none")+"&w="+l+"&h="+n+"&border="+m+"&xml="+encodeURIComponent(g))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var f=this.getFutureCellForEdit(c.model,a,d.source.id);f!=d.source&&(d.source=f)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,d){var c=a.getCell(d);if(null==c)for(var f=b.changes.length-1;0<=f;f--){var g=b.changes[f];if(g.constructor==mxChildChange&&null!=g.child&&g.child.id==d){a.contains(g.previous)&&
(c=g.child);break}}return c}})();function DiagramPage(a){this.node=a;null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
function RenamePage(a,b,f){this.ui=a;this.page=b;this.previous=this.name=f}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,b,f){this.ui=a;this.oldIndex=b;this.newIndex=f}
@@ -3180,8 +3200,8 @@ null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.page
a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),f=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&
this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var f=b.getProperty("edit").changes,k=0;k<f.length;k++)if(f[k]instanceof SelectPage||f[k]instanceof RenamePage||f[k]instanceof MovePage||f[k]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
EditorUi.prototype.restoreViewState=function(a,b,f){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(d.setViewState(b),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+b.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+b.scrollTop,d.restoreSelection(f))};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),n=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),
-shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(d)||isNaN(k)?mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),n=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),
+shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(d)||isNaN(k)?mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),
selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
Graph.prototype.saveViewState=function(a,b,f){f||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);f=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=f&&(b.setAttribute("pageWidth",f.width),b.setAttribute("pageHeight",f.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",
@@ -3203,9 +3223,9 @@ EditorUi.prototype.createTabContainer=function(){var a=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var f=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
f)/this.pages.length)+1),k=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,
"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(n,this.createTabForPage(this.pages[n],d,this.pages[n]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
-d=this.createPageMenuTab();this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-f){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var q=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");q.style.position="absolute";q.style.right=this.editor.chromeless?"29px":"55px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var r=this.createControlTab(4,
-"&nbsp;&#10095;");r.style.position="absolute";r.style.right=this.editor.chromeless?"0px":"29px";r.style.fontSize="13pt";this.tabContainer.appendChild(r);var u=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=u+"px";mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,u-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(q,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(r,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+d=this.createPageMenuTab();this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-f){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var r=this.createControlTab(4,
+"&nbsp;&#10095;");r.style.position="absolute";r.style.right=this.editor.chromeless?"0px":"29px";r.style.fontSize="13pt";this.tabContainer.appendChild(r);var u=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=u+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(r,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;
b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var f=this.createTab(!0);f.style.paddingTop=a+"px";f.style.cursor="pointer";f.style.width="30px";f.style.lineHeight="30px";f.innerHTML=b;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};
@@ -3215,7 +3235,7 @@ null,mxUtils.bind(this,function(){this.renamePage(f,f.getName())}),b),a.addSepar
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,b,f){f=this.createTab(f);var d=a.getName()||mxResources.get("untitled"),k=a.getId();f.setAttribute("title",d+(null!=k?" ("+k+")":""));mxUtils.write(f,d);f.style.maxWidth=b+"px";f.style.width=b+"px";this.addTabListeners(a,f);42<b&&(f.style.textOverflow="ellipsis");return f};
EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var f=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;f.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(n){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(n)&&k||mxEvent.isPopupTrigger(n))){f.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!d){var q=new mxPopupMenu(this.createPageMenu(a));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);this.resetCurrentMenu();q.destroy()});var r=mxEvent.getClientX(n),u=mxEvent.getClientY(n);q.popup(r,u,null,n);this.setCurrentMenu(q,b)}mxEvent.consume(n)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var r=mxEvent.getClientX(n),u=mxEvent.getClientY(n);p.popup(r,u,null,n);this.setCurrentMenu(p,b)}mxEvent.consume(n)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(f,d){f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);f.addSeparator(d);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
@@ -3223,38 +3243,38 @@ mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prot
a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var f=d.getAttribute("id");null==a.lookup(f)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,f,r,u){d=null!=d?d:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=f.slice(),g=[],h=0;h<f.length;h++){var k=this.view.getState(f[h]),n=null!=k?k.style:this.getCellStyle(f[h]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(f[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=f[h]&&g.push(a);return a==f[h]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(f[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);f=c;f=b.apply(this,arguments)}finally{this.model.endUpdate()}return f};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return t.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=t.getParent(a),b=m.view.getState(a),m.view.getState(a),b="tree"==(null!=
-b?b.style:m.getCellStyle(a)).containerType);return b}function f(a){var b=!1;null!=a&&(a=t.getParent(a),b=m.view.getState(a),m.view.getState(a),b=null!=(null!=b?b.style:m.getCellStyle(a)).childLayout);return b}function r(a){a=m.view.getState(a);if(null!=a){var b=m.getIncomingEdges(a.cell);if(0<b.length&&(b=m.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
+this.model.setCollapsed(f[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);f=c;f=b.apply(this,arguments)}finally{this.model.endUpdate()}return f};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return q.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=q.getParent(a),b=m.view.getState(a),m.view.getState(a),b="tree"==(null!=
+b?b.style:m.getCellStyle(a)).containerType);return b}function f(a){var b=!1;null!=a&&(a=q.getParent(a),b=m.view.getState(a),m.view.getState(a),b=null!=(null!=b?b.style:m.getCellStyle(a)).childLayout);return b}function r(a){a=m.view.getState(a);if(null!=a){var b=m.getIncomingEdges(a.cell);if(0<b.length&&(b=m.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function u(a,b){b=null!=b?b:!0;m.model.beginUpdate();try{var c=m.model.getParent(a),d=m.getIncomingEdges(a),f=m.cloneCells([d[0],a]);m.model.setTerminal(f[0],m.model.getTerminal(d[0],!0),!0);var g=r(a),h=c.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-
-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;m.view.currentRoot!=c&&(f[1].geometry.x-=h.x,f[1].geometry.y-=h.y);var k=m.view.getState(a),l=m.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*l;var q=m.getOutgoingEdges(m.model.getTerminal(d[0],!0));if(null!=q){for(var t=g==mxConstants.DIRECTION_SOUTH||
-g==mxConstants.DIRECTION_NORTH,p=h=d=0;p<q.length;p++){var v=m.model.getTerminal(q[p],!1);if(g==r(v)){var u=m.view.getState(v);v!=a&&null!=u&&(t&&b!=u.getCenterX()<k.getCenterX()||!t&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/l),h=10+Math.max(h,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/l))}}t?h=0:d=0;for(p=0;p<q.length;p++)if(v=m.model.getTerminal(q[p],!1),g==r(v)&&(u=m.view.getState(v),v!=a&&null!=
-u&&(t&&b!=u.getCenterX()<k.getCenterX()||!t&&b!=u.getCenterY()<k.getCenterY()))){var z=[];m.traverse(u.cell,!0,function(a,b){null!=b&&z.push(b);z.push(a);return!0});m.moveCells(z,(b?1:-1)*d,(b?1:-1)*h)}}}return m.addCells(f,c)}finally{m.model.endUpdate()}}function c(a){m.model.beginUpdate();try{var b=r(a),c=m.getIncomingEdges(a),d=m.cloneCells([c[0],a]);m.model.setTerminal(c[0],d[1],!1);m.model.setTerminal(d[0],d[1],!0);m.model.setTerminal(d[0],a,!1);var f=m.model.getParent(a),g=f.geometry,h=[];m.view.currentRoot!=
+10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;m.view.currentRoot!=c&&(f[1].geometry.x-=h.x,f[1].geometry.y-=h.y);var k=m.view.getState(a),l=m.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*l;var q=m.getOutgoingEdges(m.model.getTerminal(d[0],!0));if(null!=q){for(var p=g==mxConstants.DIRECTION_SOUTH||
+g==mxConstants.DIRECTION_NORTH,v=h=d=0;v<q.length;v++){var t=m.model.getTerminal(q[v],!1);if(g==r(t)){var u=m.view.getState(t);t!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/l),h=10+Math.max(h,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/l))}}p?h=0:d=0;for(v=0;v<q.length;v++)if(t=m.model.getTerminal(q[v],!1),g==r(t)&&(u=m.view.getState(t),t!=a&&null!=
+u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY()))){var w=[];m.traverse(u.cell,!0,function(a,b){null!=b&&w.push(b);w.push(a);return!0});m.moveCells(w,(b?1:-1)*d,(b?1:-1)*h)}}}return m.addCells(f,c)}finally{m.model.endUpdate()}}function c(a){m.model.beginUpdate();try{var b=r(a),c=m.getIncomingEdges(a),d=m.cloneCells([c[0],a]);m.model.setTerminal(c[0],d[1],!1);m.model.setTerminal(d[0],d[1],!0);m.model.setTerminal(d[0],a,!1);var f=m.model.getParent(a),g=f.geometry,h=[];m.view.currentRoot!=
f&&(d[1].geometry.x-=g.x,d[1].geometry.y-=g.y);m.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);m.moveCells(h,k,l);return m.addCells(d,f)}finally{m.model.endUpdate()}}function g(a){m.model.beginUpdate();try{var b=m.model.getParent(a),c=m.getIncomingEdges(a),d=m.cloneCells([c[0],
-a]);m.model.setTerminal(d[0],a,!0);var c=m.getOutgoingEdges(a),f=b.geometry,g=[];m.view.currentRoot==b&&(f=new mxRectangle);for(var h=0;h<c.length;h++){var k=m.model.getTerminal(c[h],!1);null!=k&&g.push(k)}var l=m.view.getBounds(g),n=r(a),q=m.view.translate,t=m.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-q.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
-null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-q.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-f.x+40):d[1].geometry.x+(a.geometry.width-f.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/t-q.y+-f.y+10);return m.addCells(d,b)}finally{m.model.endUpdate()}}function h(a,b,c){a=m.getOutgoingEdges(a);c=m.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var f=0;f<a.length;f++){var g=m.view.getState(m.model.getTerminal(a[f],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,b){var c=r(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?p.actions.get("selectParent").funct():
-c==b?(d=m.getOutgoingEdges(a),null!=d&&0<d.length&&m.setSelectionCell(m.model.getTerminal(d[0],!1))):(c=m.getIncomingEdges(a),null!=c&&0<c.length&&(d=h(m.model.getTerminal(c[0],!0),d,a),c=m.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&m.setSelectionCell(d[c].cell)))))}var p=this,m=p.editor.graph,t=m.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
-mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var x=p.menus.createPopupMenu;p.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==m.getSelectionCount()){c=m.getSelectionCell();var f=m.getOutgoingEdges(c);a.addSeparator();null!=f&&0<f.length&&(b(m.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(m.getSelectionCell())&&(a.addSeparator(),0<m.getIncomingEdges(c).length&&
-this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};p.actions.addAction("selectChildren",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(m.model.getTerminal(a[c],!1));m.setSelectionCells(b)}}},null,null,"Alt+Shift+X");p.actions.addAction("selectSiblings",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getIncomingEdges(a);if(null!=a&&0<a.length&&
-(a=m.getOutgoingEdges(m.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(m.model.getTerminal(a[c],!1));m.setSelectionCells(b)}}},null,null,"Alt+Shift+S");p.actions.addAction("selectParent",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getIncomingEdges(a);null!=a&&0<a.length&&m.setSelectionCell(m.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=
-m.getSelectionCell(),b=[];m.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});m.setSelectionCells(b)}},null,null,"Alt+Shift+D");var w=m.removeCells;m.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var f=[],g=0;g<a.length;g++){var h=a[g];t.isEdge(h)&&d(h)&&(f.push(h),h=t.getTerminal(h,!1));b(h)?(m.traverse(h,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0}),h=m.getIncomingEdges(a[g]),
-a=a.concat(h)):f.push(a[g])}a=f;return w.apply(this,arguments)};p.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var D=m.duplicateCells;m.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),f=0;f<d.length;f++){var g=m.view.getState(d[f]);if(null!=g&&b(g.cell))for(var h=m.getIncomingEdges(g.cell),g=0;g<h.length;g++)mxUtils.remove(h[g],a)}this.model.beginUpdate();try{var k=D.call(this,a,c);if(k.length==
-a.length)for(f=0;f<a.length;f++)if(b(a[f])){var l=m.getIncomingEdges(k[f]),h=m.getIncomingEdges(a[f]);if(0==l.length&&0<h.length){var n=this.cloneCell(h[0]);this.addEdge(n,m.getDefaultParent(),this.model.getTerminal(h[0],!0),k[f])}}}finally{this.model.endUpdate()}return k};var y=m.moveCells;m.moveCells=function(a,c,d,f,g,h,k){var l=null;this.model.beginUpdate();try{var n=g,q=this.view.getState(g),t=null!=q?q.style:this.getCellStyle(g);if(null!=a&&b(g)&&"1"==mxUtils.getValue(t,"treeFolding","0")){for(var p=
-0;p<a.length;p++)if(b(a[p])||m.model.isEdge(a[p])&&null==m.model.getTerminal(a[p],!0)){g=m.model.getParent(a[p]);break}if(null!=n&&g!=n&&null!=this.view.getState(a[0])){var r=m.getIncomingEdges(a[0]);if(0<r.length){var v=m.view.getState(m.model.getTerminal(r[0],!0));if(null!=v){var u=m.view.getState(n);null!=u&&(c=(u.getCenterX()-v.getCenterX())/m.view.scale,d=(u.getCenterY()-v.getCenterY())/m.view.scale)}}}}l=y.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))b(n)&&
-0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],n,!0);else if(b(a[p])&&(r=m.getIncomingEdges(a[p]),0<r.length))if(!f)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],n,!0);else if(0==m.getIncomingEdges(l[p]).length){q=n;if(null==q||q==m.model.getParent(a[p]))q=m.model.getTerminal(r[0],!0);f=this.cloneCell(r[0]);this.addEdge(f,m.getDefaultParent(),q,l[p])}}finally{this.model.endUpdate()}return l};if(null!=p.sidebar){var v=p.sidebar.dropAndConnect;
-p.sidebar.dropAndConnect=function(a,c,d,f){var g=m.model,h=null;g.beginUpdate();try{if(h=v.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(g.isEdge(h[k])&&null==g.getTerminal(h[k],!0)){g.setTerminal(h[k],a,!0);var l=m.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return h}}var A={88:p.actions.get("selectChildren"),84:p.actions.get("selectSubtree"),80:p.actions.get("selectParent"),83:p.actions.get("selectSiblings")},F=
-p.onKeyDown;p.onKeyDown=function(a){try{if(m.isEnabled()&&!m.isEditing()&&b(m.getSelectionCell())&&1==m.getSelectionCount()){var d=null;0<m.getIncomingEdges(m.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(m.getSelectionCell()):g(m.getSelectionCell()):13==a.which&&(d=u(m.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&m.model.isEdge(d[0])?m.setSelectionCell(m.model.getTerminal(d[0],!1)):m.setSelectionCell(d[d.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(m.view.getState(m.getSelectionCell())),
+a]);m.model.setTerminal(d[0],a,!0);var c=m.getOutgoingEdges(a),f=b.geometry,g=[];m.view.currentRoot==b&&(f=new mxRectangle);for(var h=0;h<c.length;h++){var k=m.model.getTerminal(c[h],!1);null!=k&&g.push(k)}var l=m.view.getBounds(g),n=r(a),q=m.view.translate,p=m.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-q.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
+null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-q.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-f.x+40):d[1].geometry.x+(a.geometry.width-f.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/p-q.y+-f.y+10);return m.addCells(d,b)}finally{m.model.endUpdate()}}function h(a,b,c){a=m.getOutgoingEdges(a);c=m.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var f=0;f<a.length;f++){var g=m.view.getState(m.model.getTerminal(a[f],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,b){var c=r(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.actions.get("selectParent").funct():
+c==b?(d=m.getOutgoingEdges(a),null!=d&&0<d.length&&m.setSelectionCell(m.model.getTerminal(d[0],!1))):(c=m.getIncomingEdges(a),null!=c&&0<c.length&&(d=h(m.model.getTerminal(c[0],!0),d,a),c=m.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&m.setSelectionCell(d[c].cell)))))}var t=this,m=t.editor.graph,q=m.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
+mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var x=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==m.getSelectionCount()){c=m.getSelectionCell();var f=m.getOutgoingEdges(c);a.addSeparator();null!=f&&0<f.length&&(b(m.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(m.getSelectionCell())&&(a.addSeparator(),0<m.getIncomingEdges(c).length&&
+this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};t.actions.addAction("selectChildren",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(m.model.getTerminal(a[c],!1));m.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getIncomingEdges(a);if(null!=a&&0<a.length&&
+(a=m.getOutgoingEdges(m.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(m.model.getTerminal(a[c],!1));m.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getIncomingEdges(a);null!=a&&0<a.length&&m.setSelectionCell(m.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=
+m.getSelectionCell(),b=[];m.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});m.setSelectionCells(b)}},null,null,"Alt+Shift+D");var w=m.removeCells;m.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var f=[],g=0;g<a.length;g++){var h=a[g];q.isEdge(h)&&d(h)&&(f.push(h),h=q.getTerminal(h,!1));b(h)?(m.traverse(h,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0}),h=m.getIncomingEdges(a[g]),
+a=a.concat(h)):f.push(a[g])}a=f;return w.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var E=m.duplicateCells;m.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),f=0;f<d.length;f++){var g=m.view.getState(d[f]);if(null!=g&&b(g.cell))for(var h=m.getIncomingEdges(g.cell),g=0;g<h.length;g++)mxUtils.remove(h[g],a)}this.model.beginUpdate();try{var k=E.call(this,a,c);if(k.length==
+a.length)for(f=0;f<a.length;f++)if(b(a[f])){var l=m.getIncomingEdges(k[f]),h=m.getIncomingEdges(a[f]);if(0==l.length&&0<h.length){var n=this.cloneCell(h[0]);this.addEdge(n,m.getDefaultParent(),this.model.getTerminal(h[0],!0),k[f])}}}finally{this.model.endUpdate()}return k};var y=m.moveCells;m.moveCells=function(a,c,d,f,g,h,k){var l=null;this.model.beginUpdate();try{var n=g,q=this.view.getState(g),p=null!=q?q.style:this.getCellStyle(g);if(null!=a&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var r=
+0;r<a.length;r++)if(b(a[r])||m.model.isEdge(a[r])&&null==m.model.getTerminal(a[r],!0)){g=m.model.getParent(a[r]);break}if(null!=n&&g!=n&&null!=this.view.getState(a[0])){var v=m.getIncomingEdges(a[0]);if(0<v.length){var t=m.view.getState(m.model.getTerminal(v[0],!0));if(null!=t){var u=m.view.getState(n);null!=u&&(c=(u.getCenterX()-t.getCenterX())/m.view.scale,d=(u.getCenterY()-t.getCenterY())/m.view.scale)}}}}l=y.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(r=0;r<l.length;r++)if(this.model.isEdge(l[r]))b(n)&&
+0>mxUtils.indexOf(l,this.model.getTerminal(l[r],!0))&&this.model.setTerminal(l[r],n,!0);else if(b(a[r])&&(v=m.getIncomingEdges(a[r]),0<v.length))if(!f)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],n,!0);else if(0==m.getIncomingEdges(l[r]).length){q=n;if(null==q||q==m.model.getParent(a[r]))q=m.model.getTerminal(v[0],!0);f=this.cloneCell(v[0]);this.addEdge(f,m.getDefaultParent(),q,l[r])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var v=t.sidebar.dropAndConnect;
+t.sidebar.dropAndConnect=function(a,c,d,f){var g=m.model,h=null;g.beginUpdate();try{if(h=v.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(g.isEdge(h[k])&&null==g.getTerminal(h[k],!0)){g.setTerminal(h[k],a,!0);var l=m.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return h}}var A={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},G=
+t.onKeyDown;t.onKeyDown=function(a){try{if(m.isEnabled()&&!m.isEditing()&&b(m.getSelectionCell())&&1==m.getSelectionCount()){var d=null;0<m.getIncomingEdges(m.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(m.getSelectionCell()):g(m.getSelectionCell()):13==a.which&&(d=u(m.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&m.model.isEdge(d[0])?m.setSelectionCell(m.model.getTerminal(d[0],!1)):m.setSelectionCell(d[d.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(m.view.getState(m.getSelectionCell())),
m.startEditingAtCell(m.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var f=A[a.keyCode];null!=f&&(f.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(l(m.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(l(m.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(l(m.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(l(m.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(N){console.log("error",N)}mxEvent.isConsumed(a)||F.apply(this,arguments)};var P=m.connectVertex;m.connectVertex=function(a,d,f,h,k,l){var n=m.getIncomingEdges(a);return b(a)&&0<n.length?(f=r(a),h=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f==d?g(a):h==k?c(a):u(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):P.call(this,a,d,f,h,k,l)};m.getSubtree=function(a){var c=[a];b(a)&&
-!f(a)&&m.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
+mxEvent.consume(a))}}catch(O){console.log("error",O)}mxEvent.isConsumed(a)||G.apply(this,arguments)};var Q=m.connectVertex;m.connectVertex=function(a,d,f,h,k,l){var n=m.getIncomingEdges(a);return b(a)&&0<n.length?(f=r(a),h=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f==d?g(a):h==k?c(a):u(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):Q.call(this,a,d,f,h,k,l)};m.getSubtree=function(a){var c=[a];b(a)&&
+!f(a)&&m.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
"18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var L=mxVertexHandler.prototype.destroy;
-mxVertexHandler.prototype.destroy=function(a,b){L.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
+this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var M=mxVertexHandler.prototype.destroy;
+mxVertexHandler.prototype.destroy=function(a,b){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,
40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!0);d.insertEdge(c,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
f.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");h.geometry.relative=!0;h.edge=!0;b.insertEdge(h,!0);f.insertEdge(h,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);k.insertEdge(n,!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");m.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);m.insertEdge(t,!1);a.insert(c);a.insert(h);a.insert(n);a.insert(t);a.insert(b);a.insert(d);a.insert(f);a.insert(k);a.insert(m);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);k.insertEdge(n,!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");m.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);m.insertEdge(q,!1);a.insert(c);a.insert(h);a.insert(n);a.insert(q);a.insert(b);a.insert(d);a.insert(f);a.insert(k);a.insert(m);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var d=new mxCell("Organization",
@@ -3270,13 +3290,13 @@ h.className="geTitle";b.appendChild(h);return h}var d=document.createElement("di
"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";g=document.createElement("span");g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("openLibrary"));d.appendChild(g);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=
c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());
a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var d=document.createElement("style");d.type="text/css";d.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane * { font-size:9pt; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(t){}var k=function(a,b,c,d,f,g,h){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";h(a);this.window=new mxWindow(b,a,c,d,f,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(q){}var k=function(a,b,c,d,f,g,h){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";h(a);this.window=new mxWindow(b,a,c,d,f,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=
Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;
HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var n=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=
-"30px");n.apply(this,arguments)};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var r=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>f&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):r.apply(this,arguments)};var u=App.prototype.updateUserElement;App.prototype.updateUserElement=
+"30px");n.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var r=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>f&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):r.apply(this,arguments)};var u=App.prototype.updateUserElement;App.prototype.updateUserElement=
function(){u.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
var c=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){c.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
"24px";a.style.width="24px"}null!=this.syncButton&&(a=this.syncButton,a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;",a.className="geToolbarButton",a.innerHTML="",a.style.backgroundImage="url("+Editor.syncImage+")",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.backgroundSize="24px 24px",a.style.height="24px",a.style.width="24px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=
@@ -3287,8 +3307,8 @@ a.y+=40;return a};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPo
c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-","lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,
["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var h=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),
this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=
-null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);h.apply(this,arguments)};var l=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){l.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var p=Menus.prototype.init;
-Menus.prototype.init=function(){p.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importFile",new Action("File...",function(){d.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type",
+null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);h.apply(this,arguments)};var l=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){l.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var t=Menus.prototype.init;
+Menus.prototype.init=function(){t.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importFile",new Action("File...",function(){d.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type",
"file");mxEvent.addListener(a,"change",function(){null!=a.files&&c.importFiles(a.files,null,null,c.maxImageSize)});a.click()}));c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+
"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,"Insert from Text","plantUml");c.showDialog(a.container,
620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();c.menus.addSubmenu("extras",a,b,mxResources.get("preferences"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(c.menus.addMenuItems(a,["new","open","-"],b),EditorUi.isElectronApp&&c.menus.addMenuItems(a,["synchronize","-"],b),c.menus.addMenuItems(a,["save","saveAs","-"],b)):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,
@@ -3312,15 +3332,15 @@ d.funct,null,mxResources.get("redo")+" ("+d.shortcut+")",d,"data:image/svg+xml;b
c([b("",function(){k.popupMenuHandler.hideMenu();var a=k.view.scale,b=k.view.translate.x,c=k.view.translate.y;h.actions.get("resetView").funct();1E-5>Math.abs(a-k.view.scale)&&b==k.view.translate.x&&c==k.view.translate.y&&h.actions.get(k.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",m,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=f?b("",d.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=f?b("",g.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null],60)}d=h.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==N&&(g=p.addMenu("",d.funct),g.setAttribute("title",mxResources.get("language")),g.className="geToolbarButton",g.style.backgroundImage="url("+Editor.globeImage+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.position="absolute",g.style.height="24px",g.style.width="24px",g.style.zIndex="1",g.style.top="11px",g.style.right=
-"8px",g.style.cursor="pointer",l.appendChild(g),N=g),h.buttonContainer.style.paddingRight="34px"):(h.buttonContainer.style.paddingRight="4px",null!=N&&(N.parentNode.removeChild(N),N=null))}m.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);var h=this,k=h.editor.graph;h.toolbar=this.createToolbar(h.createDiv("geToolbar"));
+null],60)}d=h.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==O&&(g=p.addMenu("",d.funct),g.setAttribute("title",mxResources.get("language")),g.className="geToolbarButton",g.style.backgroundImage="url("+Editor.globeImage+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.position="absolute",g.style.height="24px",g.style.width="24px",g.style.zIndex="1",g.style.top="11px",g.style.right=
+"8px",g.style.cursor="pointer",l.appendChild(g),O=g),h.buttonContainer.style.paddingRight="34px"):(h.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}m.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);var h=this,k=h.editor.graph;h.toolbar=this.createToolbar(h.createDiv("geToolbar"));
h.defaultLibraryName=mxResources.get("untitledLibrary");var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(h,l);h.statusContainer=h.createStatusContainer();h.statusContainer.style.position="relative";h.statusContainer.style.maxWidth="";h.statusContainer.style.marginTop="7px";h.statusContainer.style.marginLeft=
-"6px";h.statusContainer.style.color="gray";h.statusContainer.style.cursor="default";h.editor.addListener("statusChanged",mxUtils.bind(this,function(){h.setStatusText(h.editor.getStatus())}));var q=h.descriptorChanged;h.descriptorChanged=function(){q.apply(this,arguments);var a=h.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);l.setAttribute("title",a.getTitle()+(null!=b?" ("+b+
+"6px";h.statusContainer.style.color="gray";h.statusContainer.style.cursor="default";h.editor.addListener("statusChanged",mxUtils.bind(this,function(){h.setStatusText(h.editor.getStatus())}));var r=h.descriptorChanged;h.descriptorChanged=function(){r.apply(this,arguments);var a=h.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);l.setAttribute("title",a.getTitle()+(null!=b?" ("+b+
")":""))}else l.removeAttribute("title")};h.setStatusText(h.editor.getStatus());l.appendChild(h.statusContainer);h.buttonContainer=document.createElement("div");h.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";l.appendChild(h.buttonContainer);h.menubarContainer=h.buttonContainer;h.tabContainer=document.createElement("div");h.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";
-var g=h.diagramContainer.parentNode,r=document.createElement("div");r.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";h.diagramContainer.style.top="47px";var u=h.menus.get("viewZoom");if(null!=u){this.tabContainer.style.right="70px";var B=p.addMenu("100%",u.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";
+var g=h.diagramContainer.parentNode,t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";h.diagramContainer.style.top="47px";var u=h.menus.get("viewZoom");if(null!=u){this.tabContainer.style.right="70px";var B=p.addMenu("100%",u.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";
B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration="none";B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";
-B.style.height=parseInt(h.tabContainer.style.height)-1+"px";B.style.lineHeight=parseInt(h.tabContainer.style.height)+1+"px";r.appendChild(B);u=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*h.editor.graph.view.scale)+"%"});h.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);h.editor.addListener("resetGraphView",u);h.editor.addListener("pageSelected",u);var J=h.setGraphEnabled;h.setGraphEnabled=function(){J.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,
-this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}r.appendChild(h.tabContainer);r.appendChild(l);r.appendChild(h.diagramContainer);g.appendChild(r);h.updateTabContainer();var N=null;d();mxEvent.addListener(window,"resize",function(){d();null!=h.sidebarWindow&&h.sidebarWindow.window.fit();null!=h.formatWindow&&h.formatWindow.window.fit();null!=h.actions.outlineWindow&&h.actions.outlineWindow.window.fit();null!=h.actions.layersWindow&&h.actions.layersWindow.window.fit();
+B.style.height=parseInt(h.tabContainer.style.height)-1+"px";B.style.lineHeight=parseInt(h.tabContainer.style.height)+1+"px";t.appendChild(B);u=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*h.editor.graph.view.scale)+"%"});h.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);h.editor.addListener("resetGraphView",u);h.editor.addListener("pageSelected",u);var K=h.setGraphEnabled;h.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,
+this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}t.appendChild(h.tabContainer);t.appendChild(l);t.appendChild(h.diagramContainer);g.appendChild(t);h.updateTabContainer();var O=null;d();mxEvent.addListener(window,"resize",function(){d();null!=h.sidebarWindow&&h.sidebarWindow.window.fit();null!=h.formatWindow&&h.formatWindow.window.fit();null!=h.actions.outlineWindow&&h.actions.outlineWindow.window.fit();null!=h.actions.layersWindow&&h.actions.layersWindow.window.fit();
null!=h.menus.tagsWindow&&h.menus.tagsWindow.window.fit();null!=h.menus.findWindow&&h.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for '{1}'\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><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 as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,f){this.init(a,b,f)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1;
GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;
@@ -3339,22 +3359,22 @@ GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view
GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),f=!1;a.style.overflow="hidden";var d=mxUtils.bind(this,function(){if(!f){f=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<=b.width+2*this.graph.border*this.graph.view.scale?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,
top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}f=!1}}),k=null,n=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==k||n||(n=!0,this.graph.maxFitScale=
null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(function(){n=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",
-d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var q=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(q);n||(q=window.setTimeout(mxUtils.bind(this,
+d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(p);n||(p=window.setTimeout(mxUtils.bind(this,
this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var r=mxUtils.bind(this,function(){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var c=
null;null!=this.graphConfig["max-height"]&&(c=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(c)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(r,0):r();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;r()}};
GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var f=this.graphConfig.layers;if(null!=f||null!=b)if(f=null!=f?f.split(" "):null,null!=b||0<f.length){var d=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var n=k.getChildCount(k.root),q=0;q<n;q++)k.setVisible(k.getChildAt(k.root,q),null!=b?d.isVisible(d.getChildAt(d.root,q)):!1);if(null==d)for(q=0;q<f.length;q++)k.setVisible(k.getChildAt(k.root,parseInt(f[q])),!0)}finally{k.endUpdate()}}};
+GraphViewer.prototype.showLayers=function(a,b){var f=this.graphConfig.layers;if(null!=f||null!=b)if(f=null!=f?f.split(" "):null,null!=b||0<f.length){var d=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var n=k.getChildCount(k.root),p=0;p<n;p++)k.setVisible(k.getChildAt(k.root,p),null!=b?d.isVisible(d.getChildAt(d.root,p)):!1);if(null==d)for(p=0;p<f.length;p++)k.setVisible(k.getChildAt(k.root,parseInt(f[p])),!0)}finally{k.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var h=document.createElement("div");h.style.borderRight="1px solid #d0d0d0";h.style.padding="3px 6px 3px 6px";mxEvent.addListener(h,"click",a);null!=c&&h.setAttribute("title",c);h.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(h,"mouseenter",function(){h.style.backgroundColor="#ddd"}),mxEvent.addListener(h,"mouseleave",
function(){h.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),h.style.cursor="pointer"):mxUtils.setOpacity(h,30);h.appendChild(a);f.appendChild(h);g++;return h}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var f=b.ownerDocument.createElement("div");f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";
f.style.whiteSpace="nowrap";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="#eee";f.style.height=this.toolbarHeight+"px";this.toolbar=f;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(f,30);var d=null,k=null,n=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,
-0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),n())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":
-"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){q(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){q(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var r=this.graph,u=r.getTolerance();r.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-r.container.scrollLeft;this.scrollTop=r.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-r.container.scrollLeft)<u&&Math.abs(this.scrollTop-r.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(f.style.opacity||0)?n():q(30))}})}for(var c=this.toolbarItems,g=0,h=null,l=null,p=0;p<c.length;p++){var m=c[p];if("pages"==m){l=b.ownerDocument.createElement("div");
-l.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(l,70);var t=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");t.style.borderRightStyle="none";t.style.paddingLeft="0px";t.style.paddingRight="0px";f.appendChild(l);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";m=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";t.style.display=l.style.display;x.style.display=l.style.display});this.addListener("graphChanged",m);m()}else if("zoom"==m)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==m){if(this.layersEnabled){var w=this.graph.getModel(),D=a(mxUtils.bind(this,function(a){if(null!=h)h.parentNode.removeChild(h),
-h=null;else{h=this.graph.createLayersDialog();mxEvent.addListener(h,"mouseleave",function(){h.parentNode.removeChild(h);h=null});a=D.getBoundingClientRect();h.style.width="140px";h.style.padding="2px 0px 2px 0px";h.style.border="1px solid #d0d0d0";h.style.backgroundColor="#eee";h.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";h.style.fontSize="11px";h.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(h,80);var b=mxUtils.getDocumentScrollOrigin(document);h.style.left=b.x+a.left+
-"px";h.style.top=b.y+a.bottom+"px";document.body.appendChild(h)}}),Editor.layersImage,mxResources.get("layers")||"Layers");w.addListener(mxEvent.CHANGE,function(){D.style.display=1<w.getChildCount(w.root)?"inline-block":"none"});D.style.display=1<w.getChildCount(w.root)?"inline-block":"none"}}else"lightbox"==m?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(m=this.graphConfig["toolbar-buttons"][m],
+0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),n())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":
+"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var r=this.graph,u=r.getTolerance();r.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
+r.container.scrollLeft;this.scrollTop=r.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-r.container.scrollLeft)<u&&Math.abs(this.scrollTop-r.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(f.style.opacity||0)?n():p(30))}})}for(var c=this.toolbarItems,g=0,h=null,l=null,t=0;t<c.length;t++){var m=c[t];if("pages"==m){l=b.ownerDocument.createElement("div");
+l.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(l,70);var q=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");q.style.borderRightStyle="none";q.style.paddingLeft="0px";q.style.paddingRight="0px";f.appendChild(l);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";m=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";q.style.display=l.style.display;x.style.display=l.style.display});this.addListener("graphChanged",m);m()}else if("zoom"==m)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==m){if(this.layersEnabled){var w=this.graph.getModel(),E=a(mxUtils.bind(this,function(a){if(null!=h)h.parentNode.removeChild(h),
+h=null;else{h=this.graph.createLayersDialog();mxEvent.addListener(h,"mouseleave",function(){h.parentNode.removeChild(h);h=null});a=E.getBoundingClientRect();h.style.width="140px";h.style.padding="2px 0px 2px 0px";h.style.border="1px solid #d0d0d0";h.style.backgroundColor="#eee";h.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";h.style.fontSize="11px";h.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(h,80);var b=mxUtils.getDocumentScrollOrigin(document);h.style.left=b.x+a.left+
+"px";h.style.top=b.y+a.bottom+"px";document.body.appendChild(h)}}),Editor.layersImage,mxResources.get("layers")||"Layers");w.addListener(mxEvent.CHANGE,function(){E.style.display=1<w.getChildCount(w.root)?"inline-block":"none"});E.style.display=1<w.getChildCount(w.root)?"inline-block":"none"}}else"lightbox"==m?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(m=this.graphConfig["toolbar-buttons"][m],
null!=m&&a(null==m.enabled||m.enabled?m.handler:function(){},m.image,m.title,m.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*g);null!=this.graphConfig.title&&(c=b.ownerDocument.createElement("div"),c.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",c.setAttribute("title",this.graphConfig.title),mxUtils.write(c,this.graphConfig.title),mxUtils.setOpacity(c,
70),f.appendChild(c));this.minToolbarWidth=34*g;var y=b.style.border,c=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};f.style.left=a.left+"px";f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
f.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=a.top+1+"px"):f.style.top=a.top+"px";"1px solid transparent"==y&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=f.parentNode&&f.parentNode.removeChild(f),null!=h&&(h.parentNode.removeChild(h),
@@ -3367,17 +3387,17 @@ GraphViewer.prototype.showLightbox=function(a,b,f){if("open"==this.graphConfig.l
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(f.style.position="absolute",f.style.right="32px",f.style.top=a.y+32+"px"):f.style.cssText="position:fixed;top:32px;right:32px;";f.style.cursor="pointer";mxEvent.addListener(f,"click",function(){d.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||
10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var d=new EditorUi(new Editor(!0),document.createElement("div"),!0);d.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";d.refresh=
-function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),n=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(f);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;n.apply(this,arguments)};var q=d.editor.graph,r=q.container;r.style.overflow="hidden";this.lightboxChrome?(r.style.border="1px solid #c0c0c0",r.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",k)):(b.style.display="none",f.style.display="none");var u=this;q.getImageFromBundles=function(a){return u.getImageUrl(a)};var c=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return u.getImageUrl(a)};return a};this.graphConfig.move&&(q.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(r.style,"border-radius","4px"),r.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(r.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(r.style,"transition","all .25s ease-in-out"));this.addClickHandler(q,d);window.setTimeout(mxUtils.bind(this,function(){r.style.outline="none";r.style.zIndex=this.lightboxZIndex;f.style.zIndex=this.lightboxZIndex;document.body.appendChild(r);document.body.appendChild(f);d.setFileData(this.xml);mxUtils.setPrefixedStyle(r.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom=
+function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),n=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(f);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;n.apply(this,arguments)};var p=d.editor.graph,r=p.container;r.style.overflow="hidden";this.lightboxChrome?(r.style.border="1px solid #c0c0c0",r.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",k)):(b.style.display="none",f.style.display="none");var u=this;p.getImageFromBundles=function(a){return u.getImageUrl(a)};var c=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return u.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(r.style,"border-radius","4px"),r.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(r.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(r.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,d);window.setTimeout(mxUtils.bind(this,function(){r.style.outline="none";r.style.zIndex=this.lightboxZIndex;f.style.zIndex=this.lightboxZIndex;document.body.appendChild(r);document.body.appendChild(f);d.setFileData(this.xml);mxUtils.setPrefixedStyle(r.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom=
"60px";d.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(d.chromelessToolbar);d.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(r.style.position="absolute",r.style.display="block",r.style.left=a.x+"px",r.style.top=a.y+"px",r.style.width=document.body.clientWidth-80+"px",r.style.height=document.body.clientHeight-80+"px",r.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute",
-d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(q,this.graph);mxEvent.addListener(b,"click",function(){d.destroy()})}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(f){throw a.innerHTML=f.message,f;}})};
+d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(b,"click",function(){d.destroy()})}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(f){throw a.innerHTML=f.message,f;}})};
GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var f=0;f<b.length;f++)a.push(b[f]);return a}for(var d=document.getElementsByTagName("*"),b=[],f=0;f<d.length;f++){var k=d[f].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[f]))}return b};
GraphViewer.createViewerForElement=function(a,b){var f=a.getAttribute("data-mxgraph");if(null!=f){var d=JSON.parse(f),k=function(f){f=mxUtils.parseXml(f);f=new GraphViewer(a,f.documentElement,d);null!=b&&b(f)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}};
GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,f){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=f;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(f,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function n(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached=
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(f,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function n(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==n(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],f=d.childNodes[0],g=b.resizeSensor.childNodes[1],h=function(){f.style.width="100000px";f.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};h();var l=!1,q=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(q))};a(q);var r,u,A,F,P=function(){if((A=b.offsetWidth)!=r||(F=b.offsetHeight)!=u)l=!0,r=A,u=F;h()},E=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};E(d,"scroll",P);E(g,"scroll",P)}var r=function(){GraphViewer.resizeSensorEnabled&&d()},u=Object.prototype.toString.call(f),c="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&f instanceof jQuery||"undefined"!==typeof Elements&&f instanceof Elements;if(c)for(var u=0,g=f.length;u<g;u++)q(f[u],r);else q(f,r);this.detach=function(){if(c)for(var a=0,d=f.length;a<d;a++)b.detach(f[a]);else b.detach(f)}};
+b.appendChild(b.resizeSensor);"static"==n(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],f=d.childNodes[0],g=b.resizeSensor.childNodes[1],h=function(){f.style.width="100000px";f.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};h();var l=!1,p=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(p))};a(p);var r,v,u,G,Q=function(){if((u=b.offsetWidth)!=r||(G=b.offsetHeight)!=v)l=!0,r=u,v=G;h()},F=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};F(d,"scroll",Q);F(g,"scroll",Q)}var r=function(){GraphViewer.resizeSensorEnabled&&d()},u=Object.prototype.toString.call(f),c="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&f instanceof jQuery||"undefined"!==typeof Elements&&f instanceof Elements;if(c)for(var u=0,g=f.length;u<g;u++)p(f[u],r);else p(f,r);this.detach=function(){if(c)for(var a=0,d=f.length;a<d;a++)b.detach(f[a]);else b.detach(f)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
diff --git a/src/main/webapp/js/atlas.min.js b/src/main/webapp/js/atlas.min.js
index 69caf4ae..9d40f916 100644
--- a/src/main/webapp/js/atlas.min.js
+++ b/src/main/webapp/js/atlas.min.js
@@ -2067,9 +2067,9 @@ d.height==c.format.height?(g.value=c.key,e.setAttribute("checked","checked"),e.d
g.value="custom",k.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var k=document.createElement("div");k.style.marginLeft="4px";k.style.width="210px";
k.style.height="24px";e.style.marginRight="6px";k.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);h.style.marginLeft="10px";h.style.marginRight="6px";k.appendChild(h);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));k.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");
p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var u={},q=PageSetupDialog.getFormats(),r=0;r<q.length;r++){var t=q[r];u[t.key]=t;var w=document.createElement("option");w.setAttribute("value",t.key);mxUtils.write(w,t.title);g.appendChild(w)}var v=!1;f();a.appendChild(g);mxUtils.br(a);
-a.appendChild(k);a.appendChild(m);var y=d,x=function(a,c){var e=u[g.value];null!=e.format?(p.value=e.format.width/100,n.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.width/100;e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,
-e.height,e.width));c&&v||e.width==y.width&&e.height==y.height||(y=e,null!=b&&b(y))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){v="custom"==g.value;
-x(a,!0)});x();return{set:function(a){d=a;f(null,null,!0)},get:function(){return y},widthInput:p,heightInput:n}};
+a.appendChild(k);a.appendChild(m);var z=d,x=function(a,c){var e=u[g.value];null!=e.format?(p.value=e.format.width/100,n.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.width/100;e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0,
+e.height,e.width));c&&v||e.width==z.width&&e.height==z.height||(z=e,null!=b&&b(z))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){v="custom"==g.value;
+x(a,!0)});x();return{set:function(a){d=a;f(null,null,!0)},get:function(){return z},widthInput:p,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
@@ -2080,8 +2080,8 @@ d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.
b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var g=e*b;d.push("M 0 "+g+" L "+c+" "+g+" M "+g+" 0 L "+g+" "+c)}return'<svg width="'+
c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=
this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,g=this.pageFormat,f=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=
-new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,v=h.x+b,y=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
-new mxPoint(Math.round(v),Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(y))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+new mxRectangle(d*e.x,d*e.y,g.width*f,g.height*f),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,v=h.x+b,z=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),
+new mxPoint(Math.round(v),Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var e=0;e<b.length;e++)if(this.graph.getModel().isVertex(b[e])){var g=this.graph.getCellGeometry(b[e]);if(null!=g&&g.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?
!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),h=Math.floor(Math.min(0,
c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+h*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-h)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
@@ -2098,14 +2098,14 @@ function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent()
var l=!1,m=null,p=null,n=null,u=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var e=0;e<n.length;e++)this.toolbar.container.appendChild(n[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=
p}l=b.cellEditor.isContentEditing();m=a;p=d;n=c}}),q=this,r=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){r.apply(this,arguments);u();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=q.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=
d.substring(0,d.length-1));q.toolbar.setFontName(d);q.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var t=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);u()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";
-if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(B){}var w=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],e=[],f;for(f in c.style)a[f]!=c.style[f]&&(d.push(c.style[f]),e.push(f));f=b.getModel().getStyle(c.cell);for(var g=null!=f?f.split(";"):[],h=0;h<g.length;h++){var k=g[h],
+if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(C){}var w=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],e=[],f;for(f in c.style)a[f]!=c.style[f]&&(d.push(c.style[f]),e.push(f));f=b.getModel().getStyle(c.cell);for(var g=null!=f?f.split(";"):[],h=0;h<g.length;h++){var k=g[h],
l=k.indexOf("=");0<=l&&(f=k.substring(0,l),k=k.substring(l+1),null!=a[f]&&"none"==k&&(d.push(k),e.push(f)))}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",d,"cells",[c.cell]))}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var x=
-["fontFamily","fontSize","fontColor"],E="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)v.push(C[a][c]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(v,y[a])&&v.push(y[a]);
-var D=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],A=v.slice(),g=0;g<m.length;g++){var p=m[g],z=p.indexOf("=");if(0<=z){var n=p.substring(0,z),T=mxUtils.indexOf(A,n);0<=T&&A.splice(T,1);for(var q=0;q<C.length;q++){var u=C[q];if(0<=
-mxUtils.indexOf(u,n))for(var t=0;t<u.length;t++){var r=mxUtils.indexOf(A,u[t]);0<=r&&A.splice(r,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,B=d.getStyle(k),g=0;g<A.length;g++){var n=A[g],w=f[n];null==w||"shape"==n&&!e||e&&!(0>mxUtils.indexOf(y,n))||(B=mxUtils.setStyle(B,n,w))}d.setStyle(k,B)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){D(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){D(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));D(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=
-h[g])if(0<=mxUtils.indexOf(y,d[g]))f||0<=mxUtils.indexOf(E,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(v,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(v,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(E,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
+["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)v.push(D[a][c]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(v,z[a])&&v.push(z[a]);
+var E=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(k),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;g<e.length;g++){var h=f[e[g]];null!=h&&b.setCellStyles(e[g],h,a)}else for(h=0;h<a.length;h++){for(var k=a[h],l=d.getStyle(k),m=null!=l?l.split(";"):[],B=v.slice(),g=0;g<m.length;g++){var p=m[g],A=p.indexOf("=");if(0<=A){var n=p.substring(0,A),U=mxUtils.indexOf(B,n);0<=U&&B.splice(U,1);for(var q=0;q<D.length;q++){var u=D[q];if(0<=
+mxUtils.indexOf(u,n))for(var t=0;t<u.length;t++){var r=mxUtils.indexOf(B,u[t]);0<=r&&B.splice(r,1)}}}}for(var f=(e=d.isEdge(k))?b.currentEdgeStyle:b.currentVertexStyle,C=d.getStyle(k),g=0;g<B.length;g++){var n=B[g],w=f[n];null==w||"shape"==n&&!e||e&&!(0>mxUtils.indexOf(z,n))||(C=mxUtils.setStyle(C,n,w))}d.setStyle(k,C)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){E(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));E(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(x,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=
+h[g])if(0<=mxUtils.indexOf(z,d[g]))f||0<=mxUtils.indexOf(F,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(v,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(v,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(F,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(b.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
@@ -2128,8 +2128,8 @@ EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipb
!1,null):d=b.apply(this,arguments);a.updatePasteActionStates();return d};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var e=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){e.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,
this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container){d=null!=d?d:0;e=null!=e?e:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(g);
-l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,p=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var n=a.container.offsetWidth-p,p=a.container.offsetHeight-p;b=b?Math.max(.3,Math.min(c||1,n/l.width)):k;c=(n-b*l.width)/2/b;var A=0==this.lightboxVerticalDivider?0:(p-b*l.height)/this.lightboxVerticalDivider/b;f&&(c=Math.max(c,0),A=Math.max(A,0));if(f||g.width<n||g.height<p)a.view.scaleAndTranslate(b,
-Math.floor(c-l.x),Math.floor(A-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/k),Math.floor(g.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
+l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,p=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var n=a.container.offsetWidth-p,p=a.container.offsetHeight-p;b=b?Math.max(.3,Math.min(c||1,n/l.width)):k;c=(n-b*l.width)/2/b;var B=0==this.lightboxVerticalDivider?0:(p-b*l.height)/this.lightboxVerticalDivider/b;f&&(c=Math.max(c,0),B=Math.max(B,0));if(f||g.width<n||g.height<p)a.view.scaleAndTranslate(b,
+Math.floor(c-l.x),Math.floor(B-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/k),Math.floor(g.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace=
"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var f=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||
0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",f);f();var e=0,f=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);
@@ -2144,12 +2144,12 @@ mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px
this.lightboxToolbarActions[m];f(w.fn,w.icon,w.tooltip)}!a.lightbox||"1"!=urlParams.close&&this.container==document.body||f(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?
"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||q(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():q(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():q(100);mxEvent.consume(a)}));
mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var v=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-
-a.container.scrollTop)<v&&Math.abs(this.startX-c.getGraphX())<v&&Math.abs(this.startY-c.getGraphY())<v&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?u():q(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=
-a.y-(this.y0||0)*b.height}y.apply(this,arguments)};var x=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),g=Math.ceil(2*c.y+b.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=e||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,e,g);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==
-c?x.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var E=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
+a.container.scrollTop)<v&&Math.abs(this.startX-c.getGraphX())<v&&Math.abs(this.startY-c.getGraphY())<v&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?u():q(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=
+a.y-(this.y0||0)*b.height}z.apply(this,arguments)};var x=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),g=Math.ceil(2*c.y+b.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=e||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,e,g);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==
+c?x.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var F=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var b=mxUtils.getOffset(a.container),e=0,g=0;null!=E&&(e=a.container.offsetWidth/2-E.x+b.x,g=a.container.offsetHeight/2-E.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&d.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),g*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==g||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-
-1),a.container.scrollTop-=g*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(b))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){E=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);break}d=d.parentNode}}))};
+this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var b=mxUtils.getOffset(a.container),e=0,g=0;null!=F&&(e=a.container.offsetWidth/2-F.x+b.x,g=a.container.offsetHeight/2-F.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&d.chromelessResize(!1,null,e*(this.cumulativeZoomFactor-1),g*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==e&&0==g||(a.container.scrollLeft-=e*(this.cumulativeZoomFactor-
+1),a.container.scrollTop-=g*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(b))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){F=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);break}d=d.parentNode}}))};
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
@@ -2372,36 +2372,36 @@ Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUt
f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&f.isSplitTarget(h,a,e)){var p=f.cloneCells(a);f.splitEdge(h,p,null,g-b.width/2,k-b.height/2);m=p}else 0<a.length&&(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var n=f.layoutManager.getLayout(h);if(null!=n){var u=f.view.scale,q=f.view.translate,r=(g+q.x)*u,t=(k+q.y)*u;for(h=0;h<m.length;h++)n.moveCell(m[h],r,t)}}d&&f.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(w){this.editorUi.handleError(w)}finally{f.model.endUpdate()}null!=
m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m));f.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=m&&1==m.length&&window.setTimeout(function(){f.startEditing(m[0])},0)}}mxEvent.consume(e)}})};Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d};
Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),h=[];if(null!=e){var g=this.editorUi.editor.graph,k=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),p=g.model.getParent(a),n=!0;if(null!=g.layoutManager){var u=g.layoutManager.getLayout(p);if(null!=u&&u.constructor==mxStackLayout&&(n=!1,h=g.view.getState(p),null!=h)){var q=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+=
-q.x;e.y+=q.y;var r=e.getTerminalPoint(!1);null!=r&&(r.x+=q.x,r.y+=q.y)}}var t=m.x,w=m.y;g.model.isEdge(c[b])&&(w=t=0);var v=g.model.isEdge(a)||null!=l&&!l.relative&&n,h=c=g.importCells(c,e.x-(v?t:0),e.y-(v?w:0),v?p:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var y=g.getCellGeometry(c[b]);y.points=null;if(null!=y.getTerminalPoint(!1))y.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(v&&g.model.isVertex(p)){var x=
+q.x;e.y+=q.y;var r=e.getTerminalPoint(!1);null!=r&&(r.x+=q.x,r.y+=q.y)}}var t=m.x,w=m.y;g.model.isEdge(c[b])&&(w=t=0);var v=g.model.isEdge(a)||null!=l&&!l.relative&&n,h=c=g.importCells(c,e.x-(v?t:0),e.y-(v?w:0),v?p:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var z=g.getCellGeometry(c[b]);z.points=null;if(null!=z.getTerminalPoint(!1))z.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(v&&g.model.isVertex(p)){var x=
g.view.getState(p),q=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,q.x,q.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),t=e.x-Math.round(m.x),w=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,t,w,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));g.fireEvent(new mxEventObject("cellsInserted",
-"cells",c))}catch(E){this.editorUi.handleError(E)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h};
+"cells",c))}catch(F){this.editorUi.handleError(F)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h};
Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,h=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a),
g=g.clone(),g.x=(a.x-e.translate.x)/e.scale,g.y=(a.y-e.translate.y)/e.scale),e=f.defaultEdgeLength,f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),f=b.getTerminalPoint(!1),e=f.x-c.x,c=f.y-c.y,e=Math.sqrt(e*e+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=e,b.y=g.y-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=e,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+
b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=e,b.y=g.y+g.height,b.setTerminalPoint(new mxPoint(b.x,b.y+b.height),!1)):d==mxConstants.DIRECTION_WEST&&(b.width=e,b.x=g.x-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1))):(!h&&45<b.width&&45<b.height&&45<g.width&&45<g.height&&(b.width*=g.height/b.height,b.height=g.height),b.x=g.x+g.width/2-b.width/2,b.y=g.y+g.height/2-b.height/2,d==mxConstants.DIRECTION_NORTH?b.y=b.y-g.height/2-b.height/2-e:d==mxConstants.DIRECTION_EAST?b.x=b.x+g.width/2+
b.width/2+e:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+g.height/2+b.height/2+e:d==mxConstants.DIRECTION_WEST&&(b.x=b.x-g.width/2-b.width/2-e),f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(g=f.getCellGeometry(c.getTerminal(!1)),null!=g&&(d==mxConstants.DIRECTION_NORTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()+g.height/2):d==mxConstants.DIRECTION_EAST?(b.x-=g.getCenterX()-g.width/2,b.y-=g.getCenterY()):d==mxConstants.DIRECTION_SOUTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()-g.height/
2):d==mxConstants.DIRECTION_WEST&&(b.x-=g.getCenterX()+g.width/2,b.y-=g.getCenterY()))))));return b};
Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),F=d):mxUtils.setOpacity(d,d==D?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,p=this,n=0;n<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[n])?
-m=n:null==l&&this.editorUi.editor.graph.model.isEdge(b[n])&&null==this.editorUi.editor.graph.model.getTerminal(b[n],!0)&&(l=n),null==m||null==l);n++);var u=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=w&&F==D){var h=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],h=this.updateShapes(a.model.isEdge(w.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=F&&null!=
-r&&F!=D?(h=a.model.isEdge(r.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(r.cell,b,I,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var q=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),q.apply(this,arguments))};var r=null,t=null,w=null,v=!1,
-y=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),E=e(this.triangleDown,mxResources.get("connect")),C=e(this.triangleLeft,mxResources.get("connect")),D=e(this.refreshTarget,mxResources.get("replace")),B=null,M=e(this.roundDrop),L=e(this.roundDrop),I=mxConstants.DIRECTION_NORTH,F=null,J=u.createPreviewElement;u.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width;
-this.previewElementHeight=b.style.height;return b};var O=u.dragEnter;u.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");O.apply(this,arguments)};var Q=u.dragExit;u.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};u.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=F&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=w&&F==D)this.previewElement.style.display=
-a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=r&&null!=F){var e=a.model.isEdge(r.cell)||null==l?m:l,g=p.getDropAndConnectGeometry(r.cell,b[e],I,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),A=a.model.getParent(r.cell),z=d.translate.x*d.scale,G=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(A)&&
-A!=d.currentRoot&&(G=d.getState(A),z=G.x,G=G.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+z+"px";this.previewElement.style.top=(g.y-k)*d.scale+G+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
-f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var P=(new Date).getTime(),H=0,A=null,G=this.editorUi.editor.graph.getCellStyle(b[0]);u.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
-this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=F=null;A!=k?(A=k,P=(new Date).getTime(),H=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==F&&(A=k,u.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):H=(new Date).getTime()-P;if(2500>H&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
-mxUtils.getValue(G,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(G,mxConstants.STYLE_SHAPE)||1500<H||a.model.isEdge(k.cell))&&H>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){w=
-k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);D.style.left=Math.floor(l.x)+"px";D.style.top=Math.floor(l.y)+"px";null==B&&(a.container.appendChild(D),B=D.parentNode);h(c,d,l,D)}else null==w||!mxUtils.contains(w,c,d)||1500<H&&!mxEvent.isShiftDown(e)?(w=null,null!=B&&(D.parentNode.removeChild(D),B=null)):null!=w&&null!=B&&
-(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,D));if(v&&null!=r&&!mxEvent.isAltDown(e)&&null==F){f=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var z=r.absolutePoints;null!=M.parentNode&&(l=z[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),
-M)));null!=L.parentNode&&(z=z[z.length-1],f.add(h(c,d,new mxRectangle(z.x-this.roundDrop.width/2,z.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(r.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,
-l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&"hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),y)),f.add(h(c,d,new mxRectangle(l.x+l.width,r.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),
-x)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),E)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,r.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),C));null!=f&&f.grow(10)}I=mxConstants.DIRECTION_NORTH;F==x?I=mxConstants.DIRECTION_EAST:F==E||F==L?I=mxConstants.DIRECTION_SOUTH:F==C&&(I=mxConstants.DIRECTION_WEST);null!=w&&F==D&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&
-(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=r&&5E3<=H||r!=k&&(null==f||!mxUtils.contains(f,c,d)||500<H&&null==F&&l))if(v=!1,r=5E3>H&&H>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=r&&l){f=[M,L,y,x,E,C];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(z=k.absolutePoints,null!=z&&(l=z[0],z=z[z.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),M.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",
-M.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",L.style.left=Math.floor(z.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(z.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(M),null==a.model.getTerminal(g,!1)&&a.container.appendChild(L))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(k.cell),
-null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&"hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),y.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",y.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=
-Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",E.style.left=y.style.left,E.style.top=Math.floor(l.y+l.height)+"px",C.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",C.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(y),a.container.appendChild(E)),a.container.appendChild(x),a.container.appendChild(C));null!=k&&(t=a.selectionCellsHandler.getHandler(k.cell),null!=t&&null!=t.setHandlesVisible&&t.setHandlesVisible(!1));v=!0}else for(f=[M,L,y,x,E,C],
-l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);v||null==t||t.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=w&&F==D?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=F||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g=
-null}return g});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[M,L,D,y,x,E,C],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=r&&null!=t&&t.reset();F=B=w=r=t=null};return u};
+"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),G=d):mxUtils.setOpacity(d,d==E?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,p=this,n=0;n<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[n])?
+m=n:null==l&&this.editorUi.editor.graph.model.isEdge(b[n])&&null==this.editorUi.editor.graph.model.getTerminal(b[n],!0)&&(l=n),null==m||null==l);n++);var u=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=w&&G==E){var h=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],h=this.updateShapes(a.model.isEdge(w.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=G&&null!=
+r&&G!=E?(h=a.model.isEdge(r.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(r.cell,b,J,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var q=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),q.apply(this,arguments))};var r=null,t=null,w=null,v=!1,
+z=e(this.triangleUp,mxResources.get("connect")),x=e(this.triangleRight,mxResources.get("connect")),F=e(this.triangleDown,mxResources.get("connect")),D=e(this.triangleLeft,mxResources.get("connect")),E=e(this.refreshTarget,mxResources.get("replace")),C=null,M=e(this.roundDrop),L=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,G=null,K=u.createPreviewElement;u.createPreviewElement=function(a){var b=K.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=b.style.width;
+this.previewElementHeight=b.style.height;return b};var O=u.dragEnter;u.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");O.apply(this,arguments)};var Q=u.dragExit;u.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};u.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=G&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=w&&G==E)this.previewElement.style.display=
+a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=r&&null!=G){var e=a.model.isEdge(r.cell)||null==l?m:l,g=p.getDropAndConnectGeometry(r.cell,b[e],J,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),B=a.model.getParent(r.cell),A=d.translate.x*d.scale,H=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(B)&&
+B!=d.currentRoot&&(H=d.getState(B),A=H.x,H=H.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+A+"px";this.previewElement.style.top=(g.y-k)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
+f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var P=(new Date).getTime(),I=0,B=null,H=this.editorUi.editor.graph.getCellStyle(b[0]);u.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
+this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=G=null;B!=k?(B=k,P=(new Date).getTime(),I=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==G&&(B=k,u.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):I=(new Date).getTime()-P;if(2500>I&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
+mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||1500<I||a.model.isEdge(k.cell))&&I>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){w=
+k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);E.style.left=Math.floor(l.x)+"px";E.style.top=Math.floor(l.y)+"px";null==C&&(a.container.appendChild(E),C=E.parentNode);h(c,d,l,E)}else null==w||!mxUtils.contains(w,c,d)||1500<I&&!mxEvent.isShiftDown(e)?(w=null,null!=C&&(E.parentNode.removeChild(E),C=null)):null!=w&&null!=C&&
+(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,E));if(v&&null!=r&&!mxEvent.isAltDown(e)&&null==G){f=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var A=r.absolutePoints;null!=M.parentNode&&(l=A[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),
+M)));null!=L.parentNode&&(A=A[A.length-1],f.add(h(c,d,new mxRectangle(A.x-this.roundDrop.width/2,A.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),A=this.graph.selectionCellsHandler.getHandler(r.cell),null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,
+l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),z)),f.add(h(c,d,new mxRectangle(l.x+l.width,r.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),
+x)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),F)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,r.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),D));null!=f&&f.grow(10)}J=mxConstants.DIRECTION_NORTH;G==x?J=mxConstants.DIRECTION_EAST:G==F||G==L?J=mxConstants.DIRECTION_SOUTH:G==D&&(J=mxConstants.DIRECTION_WEST);null!=w&&G==E&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&
+(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=r&&5E3<=I||r!=k&&(null==f||!mxUtils.contains(f,c,d)||500<I&&null==G&&l))if(v=!1,r=5E3>I&&I>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=r&&l){f=[M,L,z,x,F,D];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(A=k.absolutePoints,null!=A&&(l=A[0],A=A[A.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),M.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",
+M.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",L.style.left=Math.floor(A.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(A.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(M),null==a.model.getTerminal(g,!1)&&a.container.appendChild(L))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),A=this.graph.selectionCellsHandler.getHandler(k.cell),
+null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),z.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",z.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=
+Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",F.style.left=z.style.left,F.style.top=Math.floor(l.y+l.height)+"px",D.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",D.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(z),a.container.appendChild(F)),a.container.appendChild(x),a.container.appendChild(D));null!=k&&(t=a.selectionCellsHandler.getHandler(k.cell),null!=t&&null!=t.setHandlesVisible&&t.setHandlesVisible(!1));v=!0}else for(f=[M,L,z,x,F,D],
+l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);v||null==t||t.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=w&&G==E?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=G||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);if(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)||a.isCellLocked(g)||f.isEdge(g))g=
+null}return g});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[M,L,E,z,x,F,D],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=r&&null!=t&&t.reset();G=C=w=r=t=null};return u};
Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)){if(1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}}else if(mxEvent.isShiftDown(d)&&!b.isSelectionEmpty())this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell());else{a=b.getFreeInsertPoint();if(mxEvent.isShiftDown(d)){var f=b.getGraphBounds(),e=b.view.translate,h=b.view.scale;a.x=f.x/h-e.x+f.width/h+b.gridSize;a.y=f.y/h-e.y}c.drop(b,d,null,a.x,a.y,!0);null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell()))}};
Sidebar.prototype.addClickHandler=function(a,c,d){var b=c.mouseDown,f=c.mouseMove,e=c.mouseUp,h=this.editorUi.editor.graph.tolerance,g=null,k=this;c.mouseDown=function(c){b.apply(this,arguments);g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=g&&(Math.abs(g.x-mxEvent.getClientX(b))>h||Math.abs(g.y-mxEvent.getClientY(b))>
@@ -2437,13 +2437,13 @@ function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphH
"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);
this.getRubberband=function(){return p};var n=(new Date).getTime(),u=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),u=0):u=(new Date).getTime()-n};var r=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
"outlineConnect","1"))&&r.apply(this,arguments)};var t=this.isToggleEvent;this.isToggleEvent=function(a){return t.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var v=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(v=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=v)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return y.apply(this,
+(v=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=v)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return z.apply(this,
arguments);b=b?a.sourceState.cell:a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&(this.isCustomLink(b)?this.customLinkClicked(b):this.openLink(b)))};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var x=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=
-this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return x.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,g){g=null!=g?g:[];if(0<c||0<d){var f=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=f.getRoot()));if(null!=e)for(var l=f.getChildCount(e),A=0;A<l;A++){var m=f.getChildAt(e,A),z=this.view.getState(m);if(null!=
-z&&this.isCellVisible(m)&&"1"!=mxUtils.getValue(z.style,"locked","0")){var p=mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(z=mxUtils.getBoundingBox(z,p));(f.isEdge(m)||f.isVertex(m))&&z.x>=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&g.push(m);this.getAllCells(a,b,c,d,m,g)}}}return g};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:E.apply(this,arguments)};this.isCellLocked=function(a){for(a=
-this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();C=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=
-b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);C=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var D=this.updateMouseEvent;this.updateMouseEvent=function(a){a=D.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
+this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return x.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,g){g=null!=g?g:[];if(0<c||0<d){var f=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=f.getRoot()));if(null!=e)for(var l=f.getChildCount(e),B=0;B<l;B++){var m=f.getChildAt(e,B),A=this.view.getState(m);if(null!=
+A&&this.isCellVisible(m)&&"1"!=mxUtils.getValue(A.style,"locked","0")){var p=mxUtils.getValue(A.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(A=mxUtils.getBoundingBox(A,p));(f.isEdge(m)||f.isVertex(m))&&A.x>=a&&A.y+A.height<=k&&A.y>=b&&A.x+A.width<=h&&g.push(m);this.getAllCells(a,b,c,d,m,g)}}}return g};var F=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:F.apply(this,arguments)};this.isCellLocked=function(a){for(a=
+this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var D=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();D=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=
+b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=D?this.addSelectionCells(D):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);D=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,c,d){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,c)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
@@ -2540,11 +2540,11 @@ this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,arguments);null!=
d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var g=new mxPoint(c,e);g.type=b;d.push(g);g=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==g||g.type!=b||g.x!=c||g.y!=e},g=.5*this.scale,c=!1,d=[],f=0;f<b.length-1;f++){for(var h=b[f+1],k=b[f],w=[],v=b[f+2];f<
-b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,v.x,v.y,h.x,h.y)<1*this.scale*this.scale;)h=v,f++,v=b[f+2];for(var c=e(0,k.x,k.y)||c,y=0;y<this.validEdges.length;y++){var x=this.validEdges[y],E=x.absolutePoints;if(null!=E&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<E.length-1;x++){for(var C=E[x+1],D=E[x],v=E[x+2];x<E.length-2&&mxUtils.ptSegDistSq(D.x,D.y,v.x,v.y,C.x,C.y)<1*this.scale*this.scale;)C=v,x++,v=E[x+2];v=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,C.x,C.y);if(null!=v&&(Math.abs(v.x-
-D.x)>g||Math.abs(v.y-D.y)>g)&&(Math.abs(v.x-C.x)>g||Math.abs(v.y-C.y)>g)){C=v.x-k.x;D=v.y-k.y;v={distSq:C*C+D*D,x:v.x,y:v.y};for(C=0;C<w.length;C++)if(w[C].distSq>v.distSq){w.splice(C,0,v);v=null;break}null==v||0!=w.length&&w[w.length-1].x===v.x&&w[w.length-1].y===v.y||w.push(v)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}v=b[b.length-1];c=e(0,v.x,v.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=
-null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var v=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var x=
-this.state.routedPoints[y],E=new mxPoint(x.x/this.scale,x.y/this.scale);0==y?E=b[0]:y==this.state.routedPoints.length-1&&(E=b[b.length-1]);var C=!1;if(null!=l&&1==x.type){var D=this.state.routedPoints[y+1],x=D.x/this.scale-E.x,D=D.y/this.scale-E.y,x=x*x+D*D;null==v&&(v=new mxPoint(E.x-l.x,E.y-l.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*e/m,v.y=v.y*e/m);x>e*e&&0<m&&(x=l.x-E.x,D=l.y-E.y,x=x*x+D*D,x>e*e&&(C=new mxPoint(E.x-v.x,E.y-v.y),x=new mxPoint(E.x+v.x,E.y+v.y),h.push(C),this.addPoints(a,h,c,d,!1,
-null,k),h=0>Math.round(v.x)||0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(C.x-v.y*h,C.y+v.x*h),a.lineTo(x.x-v.y*h,x.y+v.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(C.x-v.y*h,C.y+v.x*h,x.x-v.y*h,x.y+v.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],C=!0))}else v=null;C||(h.push(E),l=E)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==
+b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,v.x,v.y,h.x,h.y)<1*this.scale*this.scale;)h=v,f++,v=b[f+2];for(var c=e(0,k.x,k.y)||c,z=0;z<this.validEdges.length;z++){var x=this.validEdges[z],F=x.absolutePoints;if(null!=F&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<F.length-1;x++){for(var D=F[x+1],E=F[x],v=F[x+2];x<F.length-2&&mxUtils.ptSegDistSq(E.x,E.y,v.x,v.y,D.x,D.y)<1*this.scale*this.scale;)D=v,x++,v=F[x+2];v=mxUtils.intersection(k.x,k.y,h.x,h.y,E.x,E.y,D.x,D.y);if(null!=v&&(Math.abs(v.x-
+E.x)>g||Math.abs(v.y-E.y)>g)&&(Math.abs(v.x-D.x)>g||Math.abs(v.y-D.y)>g)){D=v.x-k.x;E=v.y-k.y;v={distSq:D*D+E*E,x:v.x,y:v.y};for(D=0;D<w.length;D++)if(w[D].distSq>v.distSq){w.splice(D,0,v);v=null;break}null==v||0!=w.length&&w[w.length-1].x===v.x&&w[w.length-1].y===v.y||w.push(v)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}v=b[b.length-1];c=e(0,v.x,v.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=
+null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var v=null;a.begin();for(var z=0;z<this.state.routedPoints.length;z++){var x=
+this.state.routedPoints[z],F=new mxPoint(x.x/this.scale,x.y/this.scale);0==z?F=b[0]:z==this.state.routedPoints.length-1&&(F=b[b.length-1]);var D=!1;if(null!=l&&1==x.type){var E=this.state.routedPoints[z+1],x=E.x/this.scale-F.x,E=E.y/this.scale-F.y,x=x*x+E*E;null==v&&(v=new mxPoint(F.x-l.x,F.y-l.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*e/m,v.y=v.y*e/m);x>e*e&&0<m&&(x=l.x-F.x,E=l.y-F.y,x=x*x+E*E,x>e*e&&(D=new mxPoint(F.x-v.x,F.y-v.y),x=new mxPoint(F.x+v.x,F.y+v.y),h.push(D),this.addPoints(a,h,c,d,!1,
+null,k),h=0>Math.round(v.x)||0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(D.x-v.y*h,D.y+v.x*h),a.lineTo(x.x-v.y*h,x.y+v.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(D.x-v.y*h,D.y+v.x*h,x.x-v.y*h,x.y+v.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],D=!0))}else v=null;D||(h.push(F),l=F)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var e=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==
a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)e.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var g=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),g=mxUtils.getRotatedPoint(g,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
0);g=this.getPerimeterPoint(b,g,0==h&&f,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),g=mxUtils.getRotatedPoint(g,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,g),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var g=0;g<a.length;g++){var f=this.graph.getConnectionPoint(b,a[g]);if(null!=f){var h=(f.x-e.x)*(f.x-e.x)+(f.y-e.y)*(f.y-e.y);if(null==d||h<d)c=f,d=h}}null!=c&&(e=c)}return e};
var h=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,8))try{var c=
@@ -2565,11 +2565,11 @@ a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error
null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};
Graph.prototype.importGraphModel=function(a,b,c,d){b=null!=b?b:0;c=null!=c?c:0;var e=new mxCodec(a.ownerDocument),g=new mxGraphModel;e.decode(a,g);a=[];e=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges()));if(null!=e){e=e.slice();this.model.beginUpdate();try{if(1!=e.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<e.length;g++)a=a.concat(this.model.getChildren(this.moveCells([e[g]],b,c,!1,this.model.getRoot())[0]));else a=this.moveCells(g.getChildren(e[0]),b,c,!1,this.getDefaultParent());
if(d){this.isGridEnabled()&&(b=this.snap(b),c=this.snap(c));var f=this.getBoundingBoxFromGeometry(a,!0);null!=f&&this.moveCells(a,b-f.x,c-f.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=null;if(null!=a.shape){var d=a.shape.direction,e=a.shape.bounds,g=a.shape.scale,c=e.width/g,e=e.height/g;if(d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH)var f=c,c=e,e=f;c=a.shape.getConstraints(a.style,c,e)}if(null!=c)return c;
-c=mxUtils.getValue(a.style,"points",null);if(null!=c){d=[];try{for(var h=JSON.parse(c),c=0;c<h.length;c++)f=h[c],d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}catch(ia){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),
+c=mxUtils.getValue(a.style,"points",null);if(null!=c){d=[];try{for(var h=JSON.parse(c),c=0;c<h.length;c++)f=h[c],d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}catch(ha){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),
b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};
Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();
-try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var g=b.getTerminal(e,!0),f=b.getTerminal(e,!1);b.setTerminal(e,f,!0);b.setTerminal(e,g,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),A=this.view.getState(g),p=this.view.getState(f);if(null!=m){var n=null!=A?this.getConnectionConstraint(m,A,!0):null,q=
+try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var g=b.getTerminal(e,!0),f=b.getTerminal(e,!1);b.setTerminal(e,f,!0);b.setTerminal(e,g,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),B=this.view.getState(g),p=this.view.getState(f);if(null!=m){var n=null!=B?this.getConnectionConstraint(m,B,!0):null,q=
null!=p?this.getConnectionConstraint(m,p,!1):null;this.setConnectionConstraint(e,g,!0,q);this.setConnectionConstraint(e,f,!1,n)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var u=h.width;h.width=h.height;h.height=u;b.setGeometry(e,h);var r=this.view.getState(e);if(null!=r){var t=r.style[mxConstants.STYLE_DIRECTION]||"east";"east"==t?t="south":"south"==t?t="west":"west"==t?t="north":"north"==t&&(t="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,
t,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=
0;c<b.length;c++){var d=this.view.getState(b[c]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)?this.removeStateForCell(b[c]):this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};
@@ -2597,12 +2597,12 @@ b.length;){for(c=b[0].parentNode;null!=b[0].firstChild;)c.insertBefore(b[0].firs
b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,g=0;g<b.length;g++)if(this.getModel().isVertex(b[g])){var f=this.view.getState(b[g]);if(null!=f){var h=a?f.getCenterX():f.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(f)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});f=this.view.translate;h=this.view.scale;e=e/h-(a?f.x:f.y);d=d/h-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,g=1;g<
c.length-1;g++){var l=this.view.getState(this.model.getParent(c[g].cell)),m=this.getCellGeometry(c[g].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[g].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=
new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(d=0;d<b.length;d++){var e=this.view.getState(a[d]);if(null!=e){var g=this.getCellGeometry(b[d]);null==g||!g.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(g.relative=!1,g.x=e.x/e.view.scale-e.view.translate.x,g.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;g=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(g,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=
-new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,g,f,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;g=null!=g?g:!0;f=null!=f?f:!0;var z=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==z)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,
-n=mxUtils.createXmlDocument(),A=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=A.style?A.style.backgroundColor=a:A.setAttribute("style","background-color:"+a));null==n.createElementNS?(A.setAttribute("xmlns",mxConstants.NS_SVG),A.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/p;var q=Math.max(1,Math.ceil(z.width*a)+2*c)+(l?5:0),u=Math.max(1,Math.ceil(z.height*
-a)+2*c)+(l?5:0);A.setAttribute("version","1.1");A.setAttribute("width",q+"px");A.setAttribute("height",u+"px");A.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+q+" "+u);n.appendChild(A);var G=this.createSvgCanvas(A);G.foOffset=e?-.5:0;G.textOffset=e?-.5:0;G.imageOffset=e?-.5:0;G.translate(Math.floor((c/b-z.x)/p),Math.floor((c/b-z.y)/p));var r=document.createElement("textarea"),t=G.createAlternateContent;G.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,z,p){var A=this.state;if(null!=this.foAltText&&
-(0==d||0!=A.fontSize&&g.length<5*d/A.fontSize)){var n=this.createElement("text");n.setAttribute("x",Math.round(d/2));n.setAttribute("y",Math.round((e+A.fontSize)/2));n.setAttribute("fill",A.fontColor||"black");n.setAttribute("text-anchor","middle");n.setAttribute("font-size",Math.round(A.fontSize)+"px");n.setAttribute("font-family",A.fontFamily);(A.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&n.setAttribute("font-weight","bold");(A.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
-n.setAttribute("font-style","italic");(A.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.setAttribute("text-decoration","underline");try{return r.innerHTML=g,n.textContent=r.value,n}catch(ra){return t.apply(this,arguments)}}else return t.apply(this,arguments)};var w=this.backgroundImage;if(null!=w){b=p/b;var v=this.view.translate,x=new mxRectangle(v.x*b,v.y*b,w.width*b,w.height*b);mxUtils.intersects(z,x)&&G.image(v.x,v.y,w.width,w.height,w.src,!0)}G.scale(a);G.textEnabled=f;h=
-null!=h?h:this.createSvgImageExport();var S=h.drawCellState;h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&S.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),G);this.updateSvgLinks(A,k,!0);return A}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");
+new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,g,f,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;g=null!=g?g:!0;f=null!=f?f:!0;var A=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==A)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,
+n=mxUtils.createXmlDocument(),B=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=B.style?B.style.backgroundColor=a:B.setAttribute("style","background-color:"+a));null==n.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/p;var q=Math.max(1,Math.ceil(A.width*a)+2*c)+(l?5:0),u=Math.max(1,Math.ceil(A.height*
+a)+2*c)+(l?5:0);B.setAttribute("version","1.1");B.setAttribute("width",q+"px");B.setAttribute("height",u+"px");B.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+q+" "+u);n.appendChild(B);var H=this.createSvgCanvas(B);H.foOffset=e?-.5:0;H.textOffset=e?-.5:0;H.imageOffset=e?-.5:0;H.translate(Math.floor((c/b-A.x)/p),Math.floor((c/b-A.y)/p));var r=document.createElement("textarea"),t=H.createAlternateContent;H.createAlternateContent=function(a,b,c,d,e,g,f,h,k,l,m,A,p){var B=this.state;if(null!=this.foAltText&&
+(0==d||0!=B.fontSize&&g.length<5*d/B.fontSize)){var n=this.createElement("text");n.setAttribute("x",Math.round(d/2));n.setAttribute("y",Math.round((e+B.fontSize)/2));n.setAttribute("fill",B.fontColor||"black");n.setAttribute("text-anchor","middle");n.setAttribute("font-size",Math.round(B.fontSize)+"px");n.setAttribute("font-family",B.fontFamily);(B.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&n.setAttribute("font-weight","bold");(B.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
+n.setAttribute("font-style","italic");(B.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.setAttribute("text-decoration","underline");try{return r.innerHTML=g,n.textContent=r.value,n}catch(qa){return t.apply(this,arguments)}}else return t.apply(this,arguments)};var w=this.backgroundImage;if(null!=w){b=p/b;var v=this.view.translate,x=new mxRectangle(v.x*b,v.y*b,w.width*b,w.height*b);mxUtils.intersects(A,x)&&H.image(v.x,v.y,w.width,w.height,w.src,!0)}H.scale(a);H.textEnabled=f;h=
+null!=h?h:this.createSvgImageExport();var T=h.drawCellState;h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!g&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(g||d)&&T.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),H);this.updateSvgLinks(B,k,!0);return B}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");
for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&
(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",
a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,g=0;g<d.length;g++)var f=d[g].getAttribute("colspan"),e=e+(null!=f?parseInt(f):1);c=c.insertRow(b);for(g=0;g<e;g++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=
@@ -2612,7 +2612,7 @@ this.getAbsoluteUrl(a));d.setAttribute("title",c(this.isCustomLink(a)?this.getLi
function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor=
"default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,g,f){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),b=this.isCellSelected(g.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||
!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<
-d;++c)b.push(a.getRangeAt(c));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(S){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&
+d;++c)b.push(a.getRangeAt(c));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(T){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&
(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));f.apply(this,arguments)};var e=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?e.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var h=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(a,b){h.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border=
"gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var g=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=
@@ -2628,7 +2628,7 @@ mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxCon
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,
"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};
mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
-this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(A){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,
+this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(B){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=
function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,g){mxEvent.isAltDown(g)&&(e=null);p.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/
d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
@@ -2656,12 +2656,12 @@ this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,
"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
this.secondDiv=null);q.apply(this,arguments)};var r=(new Date).getTime(),t=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){w.apply(this,arguments);c!=this.currentTerminalState?(r=(new Date).getTime(),t=0):t=(new Date).getTime()-r;this.currentTerminalState=c};var v=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
2E3<t||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&v.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
-d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;
-mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),
-null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var E=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,
-new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):E.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
-function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var D=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){D.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){B.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var M=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){M.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
+d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;
+mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),
+null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,
+new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):F.apply(this,arguments)};var D=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&D.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){E.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var M=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){M.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,
d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));
@@ -2669,12 +2669,12 @@ this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.cre
function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var L=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){L.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);
-this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var I=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){I.apply(this,
-arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var J=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
-function(){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
+this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var J=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){J.apply(this,
+arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
+"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
+function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Q=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Q.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
-a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var P=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var H=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){H.apply(this,arguments);null!=this.linkHint&&
+a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var P=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var I=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){I.apply(this,arguments);null!=this.linkHint&&
(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#d7d7d7";Format.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput curlyBracket singleArrow callout doubleArrow flexArrow card umlLifeline".split(" ");
Format.prototype.init=function(){var a=this.editorUi.editor,c=a.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});c.getSelectionModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.EDITING_STARTED,this.update);c.addListener(mxEvent.EDITING_STOPPED,this.update);c.getModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));a.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()}));
this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),d=0;d<a.length;d++)this.updateSelectionStateForCell(c,a[d],a);return c};
@@ -2766,49 +2766,49 @@ TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(m
" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var p=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([p]);g=e.cloneNode(!1);g.style.marginLeft="-3px";g.style.paddingBottom="0px";var n=function(a){return function(){return a()}},u=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),
b.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),g),q=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),g),r=this.editorUi.toolbar.addButton("geSprite-right",
mxResources.get("right"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),g);this.styleButtons([u,q,r]);if(b.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",null,function(){document.execCommand("strikeThrough",!1,null)},k);this.styleButtons([t]);t.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
-t.firstChild.style.backgroundPosition="2px 2px";t.firstChild.style.backgroundSize="18px 18px";this.styleButtons([t])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),g),v=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),g),y=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),g);this.styleButtons([w,v,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);var x,E,C,D,B,M,L;b.cellEditor.isContentEditing()?(w.style.display="none",v.style.display="none",y.style.display="none",p.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},g),this.styleButtons([C,
-x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},g),E=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},g)]),C.style.marginRight="9px",n=g.cloneNode(!1),n.style.paddingTop="4px",g=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),
+t.firstChild.style.backgroundPosition="2px 2px";t.firstChild.style.backgroundSize="18px 18px";this.styleButtons([t])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),g),v=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),g),z=this.editorUi.toolbar.addButton("geSprite-bottom",
+mxResources.get("bottom"),n(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),g);this.styleButtons([w,v,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);var x,F,D,E,C,M,L;b.cellEditor.isContentEditing()?(w.style.display="none",v.style.display="none",z.style.display="none",p.style.display="none",D=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},g),this.styleButtons([D,
+x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},g),F=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},g)]),D.style.marginRight="9px",n=g.cloneNode(!1),n.style.paddingTop="4px",g=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),
function(){document.execCommand("insertorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-removeformat",
mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},n),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},n)],this.styleButtons(g),g[g.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),n.style.height="40"),a.appendChild(n)):(m[2].style.marginRight="9px",r.style.marginRight="9px");g=e.cloneNode(!1);g.style.marginLeft="0px";g.style.paddingTop="8px";g.style.paddingBottom="4px";g.style.fontWeight=
-"normal";mxUtils.write(g,mxResources.get("position"));var I=document.createElement("select");I.style.position="absolute";I.style.right="20px";I.style.width="97px";I.style.marginTop="-2px";for(var t="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),F={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,
+"normal";mxUtils.write(g,mxResources.get("position"));var J=document.createElement("select");J.style.position="absolute";J.style.right="20px";J.style.width="97px";J.style.marginTop="-2px";for(var t="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),G={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,
mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},n=0;n<t.length;n++){var J=document.createElement("option");J.setAttribute("value",t[n]);mxUtils.write(J,mxResources.get(t[n]));I.appendChild(J)}g.appendChild(I);t=e.cloneNode(!1);t.style.marginLeft="0px";t.style.paddingTop="4px";t.style.paddingBottom="4px";t.style.fontWeight="normal";mxUtils.write(t,mxResources.get("writingDirection"));
-var O=document.createElement("select");O.style.position="absolute";O.style.right="20px";O.style.width="97px";O.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},n=0;n<J.length;n++){var P=document.createElement("option");P.setAttribute("value",J[n]);mxUtils.write(P,mxResources.get(J[n]));O.appendChild(P)}t.appendChild(O);b.isEditing()||(a.appendChild(g),mxEvent.addListener(I,
-"change",function(a){b.getModel().beginUpdate();try{var c=F[I.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),a.appendChild(t),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,
-Q[O.value],b.getSelectionCells());mxEvent.consume(a)}));var H=document.createElement("input");H.style.textAlign="right";H.style.marginTop="4px";mxClient.IS_QUIRKS||(H.style.position="absolute",H.style.right="32px");H.style.width="46px";H.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(H);var A=null,g=this.installInputHandler(H,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},n=0;n<t.length;n++){var K=document.createElement("option");K.setAttribute("value",t[n]);mxUtils.write(K,mxResources.get(t[n]));J.appendChild(K)}g.appendChild(J);t=e.cloneNode(!1);t.style.marginLeft="0px";t.style.paddingTop="4px";t.style.paddingBottom="4px";t.style.fontWeight="normal";mxUtils.write(t,mxResources.get("writingDirection"));
+var O=document.createElement("select");O.style.position="absolute";O.style.right="20px";O.style.width="97px";O.style.marginTop="-2px";for(var K=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},n=0;n<K.length;n++){var P=document.createElement("option");P.setAttribute("value",K[n]);mxUtils.write(P,mxResources.get(K[n]));O.appendChild(P)}t.appendChild(O);b.isEditing()||(a.appendChild(g),mxEvent.addListener(J,
+"change",function(a){b.getModel().beginUpdate();try{var c=G[J.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),a.appendChild(t),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,
+Q[O.value],b.getSelectionCells());mxEvent.consume(a)}));var I=document.createElement("input");I.style.textAlign="right";I.style.marginTop="4px";mxClient.IS_QUIRKS||(I.style.position="absolute",I.style.right="32px");I.style.width="46px";I.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(I);var B=null,g=this.installInputHandler(I,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,
e){c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",
-!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var g=e.getElementsByTagName("*");c(e);for(e=0;e<g.length;e++)c(g[e])}H.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},g=null,document.selection?g=document.selection.createRange().parentElement():(d=window.getSelection(),0<d.rangeCount&&(g=d.getRangeAt(0).commonAncestorContainer)),null!=g&&c(b.cellEditor.textarea,
-g))for(A=a,document.execCommand("fontSize",!1,"4"),g=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<g.length;e++)if("4"==g[e].getAttribute("size")){g[e].removeAttribute("size");g[e].style.fontSize=A+"px";window.setTimeout(function(){H.value=A+" pt";A=null},0);break}},!0),g=this.createStepper(H,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=H.style.display;g.style.marginTop="4px";mxClient.IS_QUIRKS||(g.style.right="20px");k.appendChild(g);k=l.getElementsByTagName("div")[0];k.style.cssFloat=
-"right";var G=null,z="#ffffff",S=null,T="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return z},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){G=a},destroy:function(){G=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=
-null})});X.style.fontWeight="bold";var V=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");V.style.fontWeight="bold";k=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return T},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){S=a},destroy:function(){S=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,
-"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";V.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});k.style.fontWeight="bold";h.appendChild(k);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(V);
+!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var g=e.getElementsByTagName("*");c(e);for(e=0;e<g.length;e++)c(g[e])}I.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},g=null,document.selection?g=document.selection.createRange().parentElement():(d=window.getSelection(),0<d.rangeCount&&(g=d.getRangeAt(0).commonAncestorContainer)),null!=g&&c(b.cellEditor.textarea,
+g))for(B=a,document.execCommand("fontSize",!1,"4"),g=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<g.length;e++)if("4"==g[e].getAttribute("size")){g[e].removeAttribute("size");g[e].style.fontSize=B+"px";window.setTimeout(function(){I.value=B+" pt";B=null},0);break}},!0),g=this.createStepper(I,g,1,10,!0,Menus.prototype.defaultFontSize);g.style.display=I.style.display;g.style.marginTop="4px";mxClient.IS_QUIRKS||(g.style.right="20px");k.appendChild(g);k=l.getElementsByTagName("div")[0];k.style.cssFloat=
+"right";var H=null,A="#ffffff",T=null,U="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return A},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){H=a},destroy:function(){H=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=
+null})});X.style.fontWeight="bold";var W=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");W.style.fontWeight="bold";k=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return U},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){T=a},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,
+"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";W.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});k.style.fontWeight="bold";h.appendChild(k);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(W);
a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);k.style.fontWeight="bold";f.containsLabel||f.autoSize||0!=f.edges.length||h.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));k.style.fontWeight="bold";h.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";
-k.style.paddingBottom="28px";k.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));k.appendChild(g);var aa,ia,ba,W,la,ca=this.addUnitInput(k,"pt",91,44,function(){aa.apply(this,arguments)}),fa=this.addUnitInput(k,"pt",20,44,function(){ia.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),
-20);mxUtils.br(k);mxUtils.br(k);var ga=this.addUnitInput(k,"pt",162,44,function(){ba.apply(this,arguments)}),Y=this.addUnitInput(k,"pt",91,44,function(){W.apply(this,arguments)}),Z=this.addUnitInput(k,"pt",20,44,function(){la.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ea=null,ja=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),
-null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ea&&(b.cellEditor.restoreSelection(ea),ea=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&
-b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ja=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ea=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],h,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",
+k.style.paddingBottom="28px";k.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));k.appendChild(g);var aa,ha,ba,R,ka,ca=this.addUnitInput(k,"pt",91,44,function(){aa.apply(this,arguments)}),ea=this.addUnitInput(k,"pt",20,44,function(){ha.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),
+20);mxUtils.br(k);mxUtils.br(k);var fa=this.addUnitInput(k,"pt",162,44,function(){ba.apply(this,arguments)}),Y=this.addUnitInput(k,"pt",91,44,function(){R.apply(this,arguments)}),Z=this.addUnitInput(k,"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var da=null,ia=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),
+null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=da&&(b.cellEditor.restoreSelection(da),da=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&
+b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ia=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(da=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(da=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],h,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",
mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(k);this.styleButtons(g);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(h);a.appendChild(k);mxClient.IS_QUIRKS&&
-(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=M?M.cellIndex:0))}catch(R){this.editorUi.handleError(R)}}),k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=B&&b.selectNode(b.insertColumn(B,null!=M?M.cellIndex+1:
--1))}catch(R){this.editorUi.handleError(R)}}),k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=B&&null!=M&&b.deleteColumn(B,M.cellIndex)}catch(R){this.editorUi.handleError(R)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=B&&null!=L&&b.selectNode(b.insertRow(B,L.sectionRowIndex))}catch(R){this.editorUi.handleError(R)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",
-mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=B&&null!=L&&b.selectNode(b.insertRow(B,L.sectionRowIndex+1))}catch(R){this.editorUi.handleError(R)}}),k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=B&&null!=L&&b.deleteRow(B,L.sectionRowIndex)}catch(R){this.editorUi.handleError(R)}}),k)];this.styleButtons(g);g[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom=
-"10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=B){var a=B.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
-("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(B.removeAttribute("border"),B.style.border="",B.style.borderCollapse=""):(B.setAttribute("border","1"),B.style.border="1px solid "+a,B.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=B){var a=B.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
-function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){B.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=B){var a=B.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?B.setAttribute("cellPadding",
-a):B.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=B&&B.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=B&&B.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=B&&B.setAttribute("align","right")},
-e)];this.styleButtons(g);g[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var U=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==
-mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(p,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=H)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),H.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-c(u,a==mxConstants.ALIGN_LEFT);c(q,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(v,a==mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);I.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?
+(k.style.height="70");k=e.cloneNode(!1);k.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=C&&b.selectNode(b.insertColumn(C,null!=M?M.cellIndex:0))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=C&&b.selectNode(b.insertColumn(C,null!=M?M.cellIndex+1:
+-1))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=C&&null!=M&&b.deleteColumn(C,M.cellIndex)}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=C&&null!=L&&b.selectNode(b.insertRow(C,L.sectionRowIndex))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",
+mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=C&&null!=L&&b.selectNode(b.insertRow(C,L.sectionRowIndex+1))}catch(S){this.editorUi.handleError(S)}}),k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=C&&null!=L&&b.deleteRow(C,L.sectionRowIndex)}catch(S){this.editorUi.handleError(S)}}),k)];this.styleButtons(g);g[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom=
+"10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(k);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=C){var a=C.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(C.removeAttribute("border"),C.style.border="",C.style.borderCollapse=""):(C.setAttribute("border","1"),C.style.border="1px solid "+a,C.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=C){var a=C.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){C.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=C){var a=C.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?C.setAttribute("cellPadding",
+a):C.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=C&&C.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=C&&C.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=C&&C.setAttribute("align","right")},
+e)];this.styleButtons(g);g[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);E=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var V=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==
+mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(p,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=I)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),I.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
+c(u,a==mxConstants.ALIGN_LEFT);c(q,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(v,a==mxConstants.ALIGN_MIDDLE);c(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);J.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?
"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
-a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(f.style,
-mxConstants.STYLE_SPACING_RIGHT,0)),Z.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Y.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),ga.value=isNaN(a)?"":a+" pt"});ia=this.installInputHandler(fa,mxConstants.STYLE_SPACING,2,-999,999," pt");aa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");la=this.installInputHandler(Z,
-mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");W=this.installInputHandler(Y,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(ga,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(H,U);this.addKeyHandler(fa,U);this.addKeyHandler(ca,U);this.addKeyHandler(Z,U);this.addKeyHandler(Y,U);this.addKeyHandler(ga,U);b.getModel().addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){b.getModel().removeListener(U)}});U();if(b.cellEditor.isContentEditing()){var oa=
-!1,e=function(){oa||(oa=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=
+a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Z)a=parseFloat(mxUtils.getValue(f.style,
+mxConstants.STYLE_SPACING_RIGHT,0)),Z.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Y.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),fa.value=isNaN(a)?"":a+" pt"});ha=this.installInputHandler(ea,mxConstants.STYLE_SPACING,2,-999,999," pt");aa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ka=this.installInputHandler(Z,
+mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");R=this.installInputHandler(Y,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(fa,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(I,V);this.addKeyHandler(ea,V);this.addKeyHandler(ca,V);this.addKeyHandler(Z,V);this.addKeyHandler(Y,V);this.addKeyHandler(fa,V);b.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){b.getModel().removeListener(V)}});V();if(b.cellEditor.isContentEditing()){var na=
+!1,e=function(){na||(na=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=
null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},f=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);
var h=mxUtils.getCurrentStyle(a),k=g(h),p=f(k,h,a),n=a.getElementsByTagName("*");if(0<n.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var t=window.getSelection(),w=0;w<n.length;w++)if(t.containsNode(n[w],!0)){temp=mxUtils.getCurrentStyle(n[w]);var k=Math.max(g(temp),k),v=f(k,temp,n[w]);if(v!=p||isNaN(v))p=""}null!=h&&(c(m[0],"bold"==h.fontWeight||400<h.fontWeight||e("B")||e("STRONG")),c(m[1],"italic"==h.fontStyle||e("I")||e("EM")),c(m[2],e("U")),c(u,d(h.textAlign,"left")),c(q,
-d(h.textAlign,"center")),c(r,d(h.textAlign,"right")),c(C,d(h.textAlign,"justify")),c(E,e("SUP")),c(x,e("SUB")),B=b.getParentByName(a,"TABLE",b.cellEditor.textarea),L=null==B?null:b.getParentByName(a,"TR",B),M=null==B?null:b.getParentByName(a,"TD",B),D.style.display=null!=B?"":"none",document.activeElement!=H&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=A?(a.removeAttribute("size"),a.style.fontSize=A+" pt",A=null):H.value=isNaN(k)?"":k+" pt",v=parseFloat(p),isNaN(v)?ja.value="100 %":ja.value=
-Math.round(100*v)+" %"),d=h.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),e=h.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=S&&(T="#"==d.charAt(0)?
-d:"#000000",S(T,!0)),null!=G&&(z="#"==e.charAt(0)?e:null,G(z,!0)),null!=l.firstChild&&(h=h.fontFamily,"'"==h.charAt(0)&&(h=h.substring(1)),"'"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1)),'"'==h.charAt(0)&&(h=h.substring(1)),'"'==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1)),l.firstChild.nodeValue=h))}oa=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,
+d(h.textAlign,"center")),c(r,d(h.textAlign,"right")),c(D,d(h.textAlign,"justify")),c(F,e("SUP")),c(x,e("SUB")),C=b.getParentByName(a,"TABLE",b.cellEditor.textarea),L=null==C?null:b.getParentByName(a,"TR",C),M=null==C?null:b.getParentByName(a,"TD",C),E.style.display=null!=C?"":"none",document.activeElement!=I&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=B?(a.removeAttribute("size"),a.style.fontSize=B+" pt",B=null):I.value=isNaN(k)?"":k+" pt",v=parseFloat(p),isNaN(v)?ia.value="100 %":ia.value=
+Math.round(100*v)+" %"),d=h.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),e=h.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=T&&(U="#"==d.charAt(0)?
+d:"#000000",T(U,!0)),null!=H&&(A="#"==e.charAt(0)?e:null,H(A,!0)),null!=l.firstChild&&(h=h.fontFamily,"'"==h.charAt(0)&&(h=h.substring(1)),"'"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1)),'"'==h.charAt(0)&&(h=h.substring(1)),'"'==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1)),l.firstChild.nodeValue=h))}na=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,
"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41);a.style.paddingTop="8px";a.style.paddingBottom="8px";this.container.appendChild(a);this.container.appendChild(this.addEffects(this.createPanel()));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
@@ -2835,13 +2835,13 @@ r=this.editorUi.toolbar.addMenuFunctionInContainer(q,"geSprite-connection",mxRes
["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,
null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(q,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){u(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));u(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));
u(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");u(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");u(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=n.cloneNode(!1),t=document.createElement("input");t.style.textAlign="right";
-t.style.marginTop="2px";t.style.width="41px";t.setAttribute("title",mxResources.get("linewidth"));n.appendChild(t);var w=t.cloneNode(!0);q.appendChild(w);var v=this.createStepper(t,c,1,9);v.style.display=t.style.display;v.style.marginTop="2px";n.appendChild(v);var y=this.createStepper(w,d,1,9);y.style.display=w.style.display;y.style.marginTop="2px";q.appendChild(y);mxClient.IS_QUIRKS?(t.style.height="17px",w.style.height="17px"):(t.style.position="absolute",t.style.right="32px",t.style.height="15px",
-v.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",y.style.right="20px");mxEvent.addListener(t,"blur",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",
+t.style.marginTop="2px";t.style.width="41px";t.setAttribute("title",mxResources.get("linewidth"));n.appendChild(t);var w=t.cloneNode(!0);q.appendChild(w);var v=this.createStepper(t,c,1,9);v.style.display=t.style.display;v.style.marginTop="2px";n.appendChild(v);var z=this.createStepper(w,d,1,9);z.style.display=w.style.display;z.style.marginTop="2px";q.appendChild(z);mxClient.IS_QUIRKS?(t.style.height="17px",w.style.height="17px"):(t.style.position="absolute",t.style.right="32px",t.style.height="15px",
+v.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",z.style.right="20px");mxEvent.addListener(t,"blur",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",
[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,
mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",
mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,
-!0).setAttribute("title",mxResources.get("entityRelation")))})),E=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML=
+!0).setAttribute("title",mxResources.get("entityRelation")))})),F=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML=
'<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-startblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],"geIcon geSprite geSprite-startasync",
@@ -2852,7 +2852,7 @@ null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-startthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],"geIcon geSprite geSprite-startdash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],"geIcon geSprite geSprite-startcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
"startFill"],["circlePlus",0],"geIcon geSprite geSprite-startcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],"geIcon geSprite geSprite-startcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],"geIcon geSprite geSprite-starterone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],"geIcon geSprite geSprite-starteronetoone",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],"geIcon geSprite geSprite-startermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],"geIcon geSprite geSprite-starteronetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-starteroneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",
-[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),C=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||
+[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}})),D=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||
"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-endclassic",
null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-endclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-endopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],
[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-endopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],"geIcon geSprite geSprite-endopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-endblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],
@@ -2863,21 +2863,21 @@ mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstant
0],"geIcon geSprite geSprite-enddiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",
null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(r,8);this.addArrow(x);this.addArrow(E);this.addArrow(C);v=this.addArrow(l,
-9);v.className="geIcon";v.style.width="84px";y=this.addArrow(m,9);y.className="geIcon";y.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom="1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";v.appendChild(D);var B=document.createElement("div");B.style.width="23px";B.style.height="1px";B.style.borderBottom="1px solid "+this.defaultStrokeColor;B.style.marginBottom="9px";y.appendChild(B);l.style.height="15px";m.style.height=
-"15px";r.style.height="15px";x.style.height="17px";E.style.marginLeft="3px";E.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";a.appendChild(h);a.appendChild(q);a.appendChild(n);l=n.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
-l.appendChild(m);var M,L,I=this.addUnitInput(l,"pt",74,33,function(){M.apply(this,arguments)}),F=this.addUnitInput(l,"pt",20,33,function(){L.apply(this,arguments)});mxUtils.br(l);v=document.createElement("div");v.style.height="8px";l.appendChild(v);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,O,Q=this.addUnitInput(l,"pt",74,33,function(){J.apply(this,arguments)}),P=this.addUnitInput(l,"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,
+"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(r,8);this.addArrow(x);this.addArrow(F);this.addArrow(D);v=this.addArrow(l,
+9);v.className="geIcon";v.style.width="84px";z=this.addArrow(m,9);z.className="geIcon";z.style.width="22px";var E=document.createElement("div");E.style.width="85px";E.style.height="1px";E.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.marginBottom="9px";v.appendChild(E);var C=document.createElement("div");C.style.width="23px";C.style.height="1px";C.style.borderBottom="1px solid "+this.defaultStrokeColor;C.style.marginBottom="9px";z.appendChild(C);l.style.height="15px";m.style.height=
+"15px";r.style.height="15px";x.style.height="17px";F.style.marginLeft="3px";F.style.height="17px";D.style.marginLeft="3px";D.style.height="17px";a.appendChild(h);a.appendChild(q);a.appendChild(n);l=n.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));
+l.appendChild(m);var M,L,J=this.addUnitInput(l,"pt",74,33,function(){M.apply(this,arguments)}),G=this.addUnitInput(l,"pt",20,33,function(){L.apply(this,arguments)});mxUtils.br(l);v=document.createElement("div");v.style.height="8px";l.appendChild(v);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var K,O,Q=this.addUnitInput(l,"pt",74,33,function(){K.apply(this,arguments)}),P=this.addUnitInput(l,"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,
mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,
-mxResources.get("perimeter"));h.appendChild(m);var H,A=this.addUnitInput(h,"pt",20,41,function(){H.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var G=mxUtils.bind(this,function(a,c,d){function h(a,c,d,g){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(g,e.style.shape,a,c);"geSprite geSprite-noarrow"==
+mxResources.get("perimeter"));h.appendChild(m);var I,B=this.addUnitInput(h,"pt",20,41,function(){I.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,g){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(g,e.style.shape,a,c);"geSprite geSprite-noarrow"==
d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,p,null);if(d||document.activeElement!=t)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),t.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
-w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?D.style.borderBottom="1px dashed "+
-this.defaultStrokeColor:D.style.borderBottom="1px dotted "+this.defaultStrokeColor:D.style.borderBottom="1px solid "+this.defaultStrokeColor;B.style.borderBottom=D.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||
+w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?E.style.borderBottom="1px dashed "+
+this.defaultStrokeColor:E.style.borderBottom="1px dotted "+this.defaultStrokeColor:E.style.borderBottom="1px solid "+this.defaultStrokeColor;C.style.borderBottom=E.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||
"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";r.getElementsByTagName("div")[0].className="link"==
-e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(q.style.display="",n.style.display="none"):(q.style.display="none",n.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),E,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
-"endFill","1"),C,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(E,30),mxUtils.setOpacity(C,30)):(mxUtils.setOpacity(E,100),mxUtils.setOpacity(C,100));if(d||document.activeElement!=
-P)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=F)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),F.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0)),I.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=A)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),A.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(P,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");L=this.installInputHandler(F,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");M=this.installInputHandler(I,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0,-999,999," pt");H=this.installInputHandler(A,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(t,G);this.addKeyHandler(P,G);this.addKeyHandler(Q,G);this.addKeyHandler(F,G);this.addKeyHandler(I,G);this.addKeyHandler(A,G);f.getModel().addListener(mxEvent.CHANGE,G);this.listeners.push({destroy:function(){f.getModel().removeListener(G)}});G();return a};
+e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(q.style.display="",n.style.display="none"):(q.style.display="none",n.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),F,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
+"endFill","1"),D,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(F,30),mxUtils.setOpacity(D,30)):(mxUtils.setOpacity(F,100),mxUtils.setOpacity(D,100));if(d||document.activeElement!=
+P)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=G)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+0)),J.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=B)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),B.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(P,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");L=this.installInputHandler(G,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");M=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+0,-999,999," pt");I=this.installInputHandler(B,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(t,H);this.addKeyHandler(P,H);this.addKeyHandler(Q,H);this.addKeyHandler(G,H);this.addKeyHandler(J,H);this.addKeyHandler(B,H);f.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){f.getModel().removeListener(H)}});H();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.fontWeight="bold";f.style.width="80px";mxUtils.write(f,mxResources.get("lineJumps"));a.appendChild(f);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px";
e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],h=0;h<f.length;h++){var g=document.createElement("option");g.setAttribute("value",f[h]);mxUtils.write(g,mxResources.get(f[h]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
mxEvent.addListener(e,"click",function(a){mxEvent.consume(a)});a.appendChild(e);var k,l=this.addUnitInput(a,"pt",22,33,function(){k.apply(this,arguments)});k=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();e.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
@@ -2903,14 +2903,14 @@ function(){b.set(d.pageFormat)});var f=function(){b.set(d.pageFormat)};c.addList
DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function u(){mxActor.call(this)}function q(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function r(){mxRectangleShape.call(this)}function t(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}
-function M(){mxEllipse.call(this)}function L(){mxShape.call(this)}function I(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxShape.call(this)}function H(){mxShape.call(this)}function A(){mxCylinder.call(this)}function G(){mxDoubleEllipse.call(this)}function z(){mxDoubleEllipse.call(this)}function S(){mxArrowConnector.call(this);this.spacing=0}function T(){mxArrowConnector.call(this);
-this.spacing=0}function X(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function ia(){mxActor.call(this)}function ba(){mxActor.call(this)}function W(){mxActor.call(this)}function la(){mxActor.call(this)}function ca(){mxActor.call(this)}function fa(){mxActor.call(this)}function ga(){mxActor.call(this)}function Y(){mxActor.call(this)}function Z(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ja(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}
-function oa(){mxRhombus.call(this)}function R(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function va(){mxActor.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function ma(){mxConnector.call(this)}function Fa(a,b,c,d,e,g,f,h,k,l){f+=k;var K=d.clone();d.x-=e*(2*f+k);d.y-=g*(2*f+k);e*=f+k;g*=f+k;return function(){a.ellipse(K.x-e-f,K.y-g-f,2*f,2*f);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
-mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),K=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,
-g);a.lineTo(d,e);a.lineTo(g,e);a.lineTo(0,e-g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-g,0),a.lineTo(d,g),a.lineTo(g,g),a.close(),a.fill()),0!=K&&(a.setFillAlpha(Math.abs(K)),a.setFillColor(0>K?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(g,g),a.lineTo(g,e),a.lineTo(0,e-g),a.close(),a.fill()),a.begin(),a.moveTo(g,e),a.lineTo(g,g),a.lineTo(0,
-0),a.moveTo(g,g),a.lineTo(d,g),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Aa=Math.tan(mxUtils.toRadians(30)),na=(.5-Aa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Aa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*
-b,b*na);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-na)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.min(d,e/(.5+Aa));g?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-na)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-na)*b),a.lineTo(.5*b,(1-na)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*na),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-na)*b),a.lineTo(0,
+this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function r(){mxRectangleShape.call(this)}function t(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function v(){mxActor.call(this)}function z(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function D(){mxCylinder.call(this)}function E(){mxShape.call(this)}function C(){mxShape.call(this)}
+function M(){mxEllipse.call(this)}function L(){mxShape.call(this)}function J(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function O(){mxShape.call(this)}function Q(){mxShape.call(this)}function P(){mxShape.call(this)}function I(){mxShape.call(this)}function B(){mxCylinder.call(this)}function H(){mxDoubleEllipse.call(this)}function A(){mxDoubleEllipse.call(this)}function T(){mxArrowConnector.call(this);this.spacing=0}function U(){mxArrowConnector.call(this);
+this.spacing=0}function X(){mxActor.call(this)}function W(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function ha(){mxActor.call(this)}function ba(){mxActor.call(this)}function R(){mxActor.call(this)}function ka(){mxActor.call(this)}function ca(){mxActor.call(this)}function ea(){mxActor.call(this)}function fa(){mxActor.call(this)}function Y(){mxActor.call(this)}function Z(){mxActor.call(this)}function da(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function V(){mxEllipse.call(this)}
+function na(){mxRhombus.call(this)}function S(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function la(){mxConnector.call(this)}function Fa(a,b,c,d,e,g,f,h,k,l){f+=k;var y=d.clone();d.x-=e*(2*f+k);d.y-=g*(2*f+k);e*=f+k;g*=f+k;return function(){a.ellipse(y.x-e-f,y.y-g-f,2*f,2*f);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),y=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,
+g);a.lineTo(d,e);a.lineTo(g,e);a.lineTo(0,e-g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-g,0),a.lineTo(d,g),a.lineTo(g,g),a.close(),a.fill()),0!=y&&(a.setFillAlpha(Math.abs(y)),a.setFillColor(0>y?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(g,g),a.lineTo(g,e),a.lineTo(0,e-g),a.close(),a.fill()),a.begin(),a.moveTo(g,e),a.lineTo(g,g),a.lineTo(0,
+0),a.moveTo(g,g),a.lineTo(d,g),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Aa=Math.tan(mxUtils.toRadians(30)),ma=(.5-Aa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Aa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*
+b,b*ma);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ma)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.min(d,e/(.5+Aa));g?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-ma)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ma)*b),a.lineTo(.5*b,(1-ma)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ma),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ma)*b),a.lineTo(0,
.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,g){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),g||(a.stroke(),a.begin()),a.translate(0,-b);g||(a.moveTo(0,
b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",b);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),
f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-g,0);a.lineTo(d,g);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-g,0),a.lineTo(d-g,g),a.lineTo(d,g),a.close(),a.fill()),a.begin(),a.moveTo(d-g,0),a.lineTo(d-g,g),a.lineTo(d,g),a.end(),a.stroke())};
@@ -2925,8 +2925,8 @@ function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.get
e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",p);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,
e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",n);mxUtils.extend(u,mxActor);u.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",u);q.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
b;this.firstX=a;this.firstY=b};q.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};q.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};q.prototype.curveTo=function(a,b,c,d,e,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};q.prototype.arcTo=function(a,b,c,d,
-e,g,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),g=Math.sqrt(d*d+e*e);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(g/10),h=this.defaultVariation;5>f&&(f=5,h/=3);for(var K=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,
-d=d/g,e=e/g,g=0;g<f;g++){var k=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,K*g+this.lastX-k*e,c*g+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
+e,g,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),g=Math.sqrt(d*d+e*e);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(g/10),y=this.defaultVariation;5>f&&(f=5,y/=3);for(var h=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,
+d=d/g,e=e/g,g=0;g<f;g++){var k=(Math.random()-.5)*y;this.originalLineTo.call(this.canvas,h*g+this.lastX-k*e,c*g+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
var Ka=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ka.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var La=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&La.apply(this,arguments)};var Ma=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ma.apply(this,arguments);else{var g=!0;null!=this.style&&(g="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(g||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)g||null!=this.fill&&this.fill!=mxConstants.NONE||
(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?g=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.min(d*g,e*g)),a.moveTo(b+g,c),a.lineTo(b+d-g,c),a.quadTo(b+d,c,b+d,c+g),a.lineTo(b+d,c+e-g),a.quadTo(b+d,c+e,b+d-g,c+e),a.lineTo(b+g,c+e),a.quadTo(b,c+e,b,c+e-g),
@@ -2936,21 +2936,21 @@ function(a,b,c,d,e){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(th
mxRectangleShape);t.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};t.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",t);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable=
function(){return!0};w.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,g+h),e-c),new mxPoint(f,e),new mxPoint(Math.max(0,g),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(v,mxActor);v.prototype.size=.2;v.prototype.fixedSize=20;v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",v);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
-function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,
+"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",v);mxUtils.extend(z,mxHexagon);z.prototype.size=.25;z.prototype.isRoundable=function(){return!0};z.prototype.redrawPath=
+function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",z);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,
b,c,d,e){var g=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+g);a.lineTo(b+d/2,c+e-g);a.moveTo(b+g,c+e/2);a.lineTo(b+d-g,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Ga=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ga.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&(a.setShadow(!1),Ga.apply(this,[a,b,c,d,e]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};E.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,f;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+
-g]];if(null!=f){var h=this.style["symbol"+g+"Align"],k=this.style["symbol"+g+"VerticalAlign"],K=this.style["symbol"+g+"Width"],l=this.style["symbol"+g+"Height"],m=this.style["symbol"+g+"Spacing"]||0,Da=this.style["symbol"+g+"VSpacing"]||m,da=this.style["symbol"+g+"ArcSpacing"];null!=da&&(da*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),m+=da,Da+=da);var da=b,sa=c,da=h==mxConstants.ALIGN_CENTER?da+(d-K)/2:h==mxConstants.ALIGN_RIGHT?da+(d-K-m):da+m,sa=k==mxConstants.ALIGN_MIDDLE?sa+(e-l)/
-2:k==mxConstants.ALIGN_BOTTOM?sa+(e-l-Da):sa+Da;a.save();h=new f;h.style=this.style;f.prototype.paintVertexShape.call(h,a,da,sa,K,l);a.restore()}g++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,b,c,d,e,g){g?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
-C);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(M,mxEllipse);M.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
-M);mxUtils.extend(L,mxShape);L.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};I.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
-e/8,d,7*e/8);a.fillAndStroke()};I.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",I);mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};F.prototype.paintBackground=
-function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"participant");null==f||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,g):(f=this.state.view.graph.cellRenderer.getShape(f),null!=f&&f!=F&&(f=new f,f.apply(this.state),a.save(),f.paintVertexShape(a,b,c,d,g),a.restore()));g<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+g),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};F.prototype.paintForeground=
-function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",F);mxUtils.extend(J,mxShape);J.prototype.width=60;J.prototype.height=30;J.prototype.corner=10;J.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};J.prototype.paintBackground=function(a,b,c,d,e){var g=this.corner,f=Math.min(d,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
-mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+f,c);a.lineTo(b+f,c+Math.max(0,h-1.5*g));a.lineTo(b+Math.max(0,f-g),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",J);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=F.prototype.size;
+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ga.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&(a.setShadow(!1),Ga.apply(this,[a,b,c,d,e]))}};mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
+this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};F.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=g;c+=g;d-=2*g;e-=2*g;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,f;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+
+g]];if(null!=f){var h=this.style["symbol"+g+"Align"],y=this.style["symbol"+g+"VerticalAlign"],k=this.style["symbol"+g+"Width"],l=this.style["symbol"+g+"Height"],va=this.style["symbol"+g+"Spacing"]||0,Da=this.style["symbol"+g+"VSpacing"]||va,m=this.style["symbol"+g+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),va+=m,Da+=m);var m=b,ra=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-va):m+va,ra=y==mxConstants.ALIGN_MIDDLE?ra+(e-l)/2:y==
+mxConstants.ALIGN_BOTTOM?ra+(e-l-Da):ra+Da;a.save();h=new f;h.style=this.style;f.prototype.paintVertexShape.call(h,a,m,ra,k,l);a.restore()}g++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",F);mxUtils.extend(D,mxCylinder);D.prototype.redrawPath=function(a,b,c,d,e,g){g?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
+D);mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",E);mxUtils.extend(C,mxShape);C.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};C.prototype.paintBackground=
+function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",C);mxUtils.extend(M,mxEllipse);M.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
+M);mxUtils.extend(L,mxShape);L.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(J,mxShape);J.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};J.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
+e/8,d,7*e/8);a.fillAndStroke()};J.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};G.prototype.paintBackground=
+function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"participant");null==f||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,g):(f=this.state.view.graph.cellRenderer.getShape(f),null!=f&&f!=G&&(f=new f,f.apply(this.state),a.save(),f.paintVertexShape(a,b,c,d,g),a.restore()));g<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+g),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};G.prototype.paintForeground=
+function(a,b,c,d,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",G);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,b,c,d,e){var g=this.corner,f=Math.min(d,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+f,c);a.lineTo(b+f,c+Math.max(0,h-1.5*g));a.lineTo(b+Math.max(0,f-g),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=G.prototype.size;
null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),
a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",w.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;
@@ -2958,99 +2958,118 @@ null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.he
f+k),new mxPoint(g+e,f)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<g||c.x>g+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(f,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=p.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h-e,f),new mxPoint(g+h,f+k),new mxPoint(g,f+k),new mxPoint(g+e,f)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g,f),new mxPoint(g+h,f),new mxPoint(g+h-e,f+k),new mxPoint(g+e,f+k),new mxPoint(g,f)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),f=[new mxPoint(g,f+e),new mxPoint(g+h,f),new mxPoint(g+h,f+k),new mxPoint(g,f+k-e),new mxPoint(g,f+e)]):(e=k*Math.max(0,
Math.min(1,e)),f=[new mxPoint(g,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+k-e),new mxPoint(g,f+k),new mxPoint(g,f)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<g||c.x>g+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(f,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),g=e?v.prototype.fixedSize:v.prototype.size;null!=b&&(g=mxUtils.getValue(b.style,
-"size",g));var f=a.x,h=a.y,k=a.width,l=a.height,K=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(f+k-e,h),new mxPoint(f+k,a),new mxPoint(f+k-e,h+l),new mxPoint(f,h+l),new mxPoint(f+e,a),new mxPoint(f,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,
-Math.min(1,g)),h=[new mxPoint(f+e,h),new mxPoint(f+k,h),new mxPoint(f+k-e,a),new mxPoint(f+k,h+l),new mxPoint(f+e,h+l),new mxPoint(f,a),new mxPoint(f+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h+e),new mxPoint(K,h),new mxPoint(f+k,h+e),new mxPoint(f+k,h+l),new mxPoint(K,h+l-e),new mxPoint(f,h+l),new mxPoint(f,h+e)]):(e=e?Math.max(0,Math.min(l,g)):l*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(K,h+e),new mxPoint(f+
-k,h),new mxPoint(f+k,h+l-e),new mxPoint(K,h+l),new mxPoint(f,h+l-e),new mxPoint(f,h)]);K=new mxPoint(K,a);d&&(c.x<f||c.x>f+k?K.y=c.y:K.x=c.x);return mxUtils.getPerimeterPoint(h,K,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),f=[new mxPoint(l,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+k-e),new mxPoint(l,f+k),new mxPoint(g,f+k-e),new mxPoint(g,f+e),new mxPoint(l,f)]):(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h-e,f),new mxPoint(g+h,a),new mxPoint(g+h-e,f+k),new mxPoint(g+e,f+k),new mxPoint(g,a),new mxPoint(g+e,f)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+
-h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(f,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(Q,mxShape);Q.prototype.size=
+"size",g));var f=a.x,h=a.y,k=a.width,y=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(f+k-e,h),new mxPoint(f+k,a),new mxPoint(f+k-e,h+y),new mxPoint(f,h+y),new mxPoint(f+e,a),new mxPoint(f,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,
+Math.min(1,g)),h=[new mxPoint(f+e,h),new mxPoint(f+k,h),new mxPoint(f+k-e,a),new mxPoint(f+k,h+y),new mxPoint(f+e,h+y),new mxPoint(f,a),new mxPoint(f+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(y,g)):y*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h+e),new mxPoint(l,h),new mxPoint(f+k,h+e),new mxPoint(f+k,h+y),new mxPoint(l,h+y-e),new mxPoint(f,h+y),new mxPoint(f,h+e)]):(e=e?Math.max(0,Math.min(y,g)):y*Math.max(0,Math.min(1,g)),h=[new mxPoint(f,h),new mxPoint(l,h+e),new mxPoint(f+
+k,h),new mxPoint(f+k,h+y-e),new mxPoint(l,h+y),new mxPoint(f,h+y-e),new mxPoint(f,h)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=z.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,f=a.y,h=a.width,k=a.height,y=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),f=[new mxPoint(y,f),new mxPoint(g+h,f+e),new mxPoint(g+h,f+k-e),new mxPoint(y,f+k),new mxPoint(g,f+k-e),new mxPoint(g,f+e),new mxPoint(y,f)]):(e=h*Math.max(0,Math.min(1,e)),f=[new mxPoint(g+e,f),new mxPoint(g+h-e,f),new mxPoint(g+h,a),new mxPoint(g+h-e,f+k),new mxPoint(g+e,f+k),new mxPoint(g,a),new mxPoint(g+e,f)]);y=new mxPoint(y,a);d&&(c.x<g||c.x>g+
+h?y.y=c.y:y.x=c.x);return mxUtils.getPerimeterPoint(f,y,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(Q,mxShape);Q.prototype.size=
10;Q.prototype.inset=2;Q.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,g+f);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-g)/2-f,g/2);a.quadTo((d-g)/2-f,g+f,d/2,g+f);a.quadTo((d+g)/2+f,g+f,(d+g)/2+f,g/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(P,mxShape);P.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",P);mxUtils.extend(H,mxShape);H.prototype.inset=2;H.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,g,d-2*g,e-2*g);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
-H);mxUtils.extend(A,mxCylinder);A.prototype.jettyWidth=32;A.prototype.jettyHeight=12;A.prototype.redrawPath=function(a,b,c,d,e,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,h=.3*e-b/2,k=.7*e-b/2;g?(a.moveTo(c,h),a.lineTo(f,h),a.lineTo(f,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(f,k),a.lineTo(f,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
-a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",A);mxUtils.extend(G,mxDoubleEllipse);G.prototype.outerStroke=!0;G.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+g,c+g,d-2*g,e-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",G);
-mxUtils.extend(z,G);z.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",z);mxUtils.extend(S,mxArrowConnector);S.prototype.defaultWidth=4;S.prototype.isOpenEnded=function(){return!0};S.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};S.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",S);mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=10;T.prototype.defaultArrowWidth=
-20;T.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};T.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",T);mxUtils.extend(X,mxActor);X.prototype.size=30;X.prototype.isRoundable=
-function(){return!0};X.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",X);mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;V.prototype.isHtmlAllowed=function(){return!1};
-V.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));f=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+g);a.lineTo(b+d,c+g);a.end();a.stroke();
-a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",V);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("corner",aa);mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ia);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy=
+function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",P);mxUtils.extend(I,mxShape);I.prototype.inset=2;I.prototype.paintBackground=function(a,b,c,d,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,g,d-2*g,e-2*g);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
+I);mxUtils.extend(B,mxCylinder);B.prototype.jettyWidth=32;B.prototype.jettyHeight=12;B.prototype.redrawPath=function(a,b,c,d,e,g){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,h=.3*e-b/2,k=.7*e-b/2;g?(a.moveTo(c,h),a.lineTo(f,h),a.lineTo(f,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(f,k),a.lineTo(f,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
+a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",B);mxUtils.extend(H,mxDoubleEllipse);H.prototype.outerStroke=!0;H.prototype.paintVertexShape=function(a,b,c,d,e){var g=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+g,c+g,d-2*g,e-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",H);
+mxUtils.extend(A,H);A.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",A);mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=4;T.prototype.isOpenEnded=function(){return!0};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};T.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",T);mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=10;U.prototype.defaultArrowWidth=
+20;U.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};U.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",U);mxUtils.extend(X,mxActor);X.prototype.size=30;X.prototype.isRoundable=
+function(){return!0};X.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",X);mxUtils.extend(W,mxRectangleShape);W.prototype.dx=20;W.prototype.dy=20;W.prototype.isHtmlAllowed=function(){return!1};
+W.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*f,e*f));f=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+g);a.lineTo(b+d,c+g);a.end();a.stroke();
+a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",W);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("corner",aa);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ha);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy=
20;ba.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-
-b)/2,c),new mxPoint(0,c)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("tee",ba);mxUtils.extend(W,mxActor);W.prototype.arrowWidth=.3;W.prototype.arrowSize=.2;W.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",W);mxUtils.extend(la,mxActor);la.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",W.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",W.prototype.arrowSize))));
-c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(b,g),new mxPoint(b,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",la);mxUtils.extend(ca,mxActor);ca.prototype.size=.1;ca.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ca);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",fa);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);
-a.close();a.end()};mxCellRenderer.registerShape("xor",ga);mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,
+b)/2,c),new mxPoint(0,c)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("tee",ba);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",R);mxUtils.extend(ka,mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));
+c=(e-g)/2;var g=c+g,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,g),new mxPoint(b,g),new mxPoint(b,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ka);mxUtils.extend(ca,mxActor);ca.prototype.size=.1;ca.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ca);mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",ea);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);
+a.close();a.end()};mxCellRenderer.registerShape("xor",fa);mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,
c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",Y);mxUtils.extend(Z,mxActor);Z.prototype.size=.375;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};
-mxCellRenderer.registerShape("offPageConnector",Z);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);
-a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ja);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",U);mxUtils.extend(oa,
-mxRhombus);oa.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",oa);mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};
-mxCellRenderer.registerShape("collate",R);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){var g=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,g);a.lineTo(b+10,g-5);a.moveTo(b,g);a.lineTo(b+10,g+5);a.moveTo(b,g);a.lineTo(b+d,g);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,g);a.lineTo(b+d-10,g-5);a.moveTo(b+d,g);a.lineTo(b+d-10,g+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=
+mxCellRenderer.registerShape("offPageConnector",Z);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",da);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);
+a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ia);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",V);mxUtils.extend(na,
+mxRhombus);na.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",na);mxUtils.extend(S,mxEllipse);S.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};
+mxCellRenderer.registerShape("collate",S);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){var g=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,g);a.lineTo(b+10,g-5);a.moveTo(b,g);a.lineTo(b+10,g+5);a.moveTo(b,g);a.lineTo(b+d,g);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,g);a.lineTo(b+d-10,g-5);a.moveTo(b+d,g);a.lineTo(b+d-10,g+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=
function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&
-a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ca);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ua);mxUtils.extend(va,mxActor);va.prototype.redrawPath=
-function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",va);mxUtils.extend(pa,mxActor);pa.prototype.size=.2;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var g=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-g)/2;c=b+g;var f=(d-g)/2,g=f+g;a.moveTo(0,b);a.lineTo(f,b);a.lineTo(f,0);a.lineTo(g,0);a.lineTo(g,b);a.lineTo(d,b);a.lineTo(d,
-c);a.lineTo(g,c);a.lineTo(g,e);a.lineTo(f,e);a.lineTo(f,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",pa);mxUtils.extend(qa,mxActor);qa.prototype.size=.25;qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",qa);mxUtils.extend(ma,
-mxConnector);ma.prototype.origPaintEdgeShape=ma.prototype.paintEdgeShape;ma.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,g=a.state.fixDash;ma.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,g),ma.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",
-ma);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),p=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-m/2-p/2,d.y-p/2+m/2);a.lineTo(d.x+
-p/2-3*m/2,d.y-3*p/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),p=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-m/2-p/2,d.y-p/2+m/2);a.lineTo(d.x+p/2-3*m/2,d.y-3*p/2-m/2);a.moveTo(d.x-m/2+p/2,d.y-p/2-m/2);a.lineTo(d.x-p/2-3*m/2,d.y-3*p/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Fa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,g,f,h,k,l){var m=d.clone(),p=Fa.apply(this,arguments),n=e*(f+2*k),K=g*(f+2*k);return function(){p.apply(this,
-arguments);a.begin();a.moveTo(m.x-e*k,m.y-g*k);a.lineTo(m.x-2*n+e*k,m.y-2*K+g*k);a.moveTo(m.x-n-K+g*k,m.y-K+n-e*k);a.lineTo(m.x+K-n-g*k,m.y-K-n+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,g,f,h,k,l){b=e*k*1.118;c=g*k*1.118;e*=f+k;g*=f+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-g-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-g/2,m.y-g+e/2):a.lineTo(m.x+g/2-e,m.y-g-e/2);a.lineTo(m.x-e,m.y-g);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",
-function(a){a=null!=a?a:2;return function(b,c,d,e,g,f,h,k,l,m){g*=h+l;f*=h+l;var p=e.clone();return function(){b.begin();b.moveTo(p.x,p.y);k?b.lineTo(p.x-g-f/a,p.y-f+g/a):b.lineTo(p.x+f/a-g,p.y-f-g/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ha=function(a,b,c){return ra(a,["width"],b,function(b,d,e,g,f){f=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(g.x+d*b/4+e*f/2,g.y+e*b/4-d*f/2)},function(b,d,e,g,f,h){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));a.style.width=
-Math.round(2*b)/a.view.scale-c})},ra=function(a,b,c,d,e){return N(a,b,function(b){var e=a.absolutePoints,g=e.length-1;b=a.view.translate;var f=a.view.scale,h=c?e[0]:e[g],e=c?e[1]:e[g-1],g=e.x-h.x,k=e.y-h.y,l=Math.sqrt(g*g+k*k),h=d.call(this,l,g/l,k/l,h,e);return new mxPoint(h.x/f-b.x,h.y/f-b.y)},function(b,d,g){var f=a.absolutePoints,h=f.length-1;b=a.view.translate;var k=a.view.scale,l=c?f[0]:f[h],f=c?f[1]:f[h-1],h=f.x-l.x,m=f.y-l.y,p=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
-p,h/p,m/p,l,f,d,g)})},ka=function(a){return function(b){return[N(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",W.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",W.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
-Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ea=function(a,b,c){return function(d){var e=[N(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ha(d));return e}},wa=function(a,b,c,d,e){c=null!=
+a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ca);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ta);mxUtils.extend(ua,mxActor);ua.prototype.redrawPath=
+function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",ua);mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var g=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-g)/2;c=b+g;var f=(d-g)/2,g=f+g;a.moveTo(0,b);a.lineTo(f,b);a.lineTo(f,0);a.lineTo(g,0);a.lineTo(g,b);a.lineTo(d,b);a.lineTo(d,
+c);a.lineTo(g,c);a.lineTo(g,e);a.lineTo(f,e);a.lineTo(f,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",oa);mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",pa);mxUtils.extend(la,
+mxConnector);la.prototype.origPaintEdgeShape=la.prototype.paintEdgeShape;la.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,g=a.state.fixDash;la.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,g),la.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",
+la);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),y=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-m/2-y/2,d.y-y/2+m/2);a.lineTo(d.x+
+y/2-3*m/2,d.y-3*y/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,g,f,h,k,l){var m=e*(f+k+1),y=g*(f+k+1);return function(){a.begin();a.moveTo(d.x-m/2-y/2,d.y-y/2+m/2);a.lineTo(d.x+y/2-3*m/2,d.y-3*y/2-m/2);a.moveTo(d.x-m/2+y/2,d.y-y/2-m/2);a.lineTo(d.x-y/2-3*m/2,d.y-3*y/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Fa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,g,f,h,k,l){var m=d.clone(),y=Fa.apply(this,arguments),p=e*(f+2*k),n=g*(f+2*k);return function(){y.apply(this,
+arguments);a.begin();a.moveTo(m.x-e*k,m.y-g*k);a.lineTo(m.x-2*p+e*k,m.y-2*n+g*k);a.moveTo(m.x-p-n+g*k,m.y-n+p-e*k);a.lineTo(m.x+n-p-g*k,m.y-n-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,g,f,h,k,l){b=e*k*1.118;c=g*k*1.118;e*=f+k;g*=f+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-g-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-g/2,m.y-g+e/2):a.lineTo(m.x+g/2-e,m.y-g-e/2);a.lineTo(m.x-e,m.y-g);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",
+function(a){a=null!=a?a:2;return function(b,c,d,e,g,f,h,k,l,m){g*=h+l;f*=h+l;var y=e.clone();return function(){b.begin();b.moveTo(y.x,y.y);k?b.lineTo(y.x-g-f/a,y.y-f+g/a):b.lineTo(y.x+f/a-g,y.y-f-g/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ha=function(a,b,c){return qa(a,["width"],b,function(b,d,e,g,f){f=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(g.x+d*b/4+e*f/2,g.y+e*b/4-d*f/2)},function(b,d,e,g,f,h){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));a.style.width=
+Math.round(2*b)/a.view.scale-c})},qa=function(a,b,c,d,e){return N(a,b,function(b){var e=a.absolutePoints,g=e.length-1;b=a.view.translate;var f=a.view.scale,h=c?e[0]:e[g],e=c?e[1]:e[g-1],g=e.x-h.x,k=e.y-h.y,l=Math.sqrt(g*g+k*k),h=d.call(this,l,g/l,k/l,h,e);return new mxPoint(h.x/f-b.x,h.y/f-b.y)},function(b,d,g){var f=a.absolutePoints,h=f.length-1;b=a.view.translate;var k=a.view.scale,l=c?f[0]:f[h],f=c?f[1]:f[h-1],h=f.x-l.x,m=f.y-l.y,y=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
+y,h/y,m/y,l,f,d,g)})},ja=function(a){return function(b){return[N(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
+Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ea=function(a,b,c){return function(d){var e=[N(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ga(d));return e}},wa=function(a,b,c,d,e){c=null!=
c?c:1;return function(g){var f=[N(g,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=f?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));f&&!mxEvent.isAltDown(d.getEvent())&&(a=g.view.graph.snap(a));this.state.style.size=
-a},null,d)];b&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ha(g));return f}},Ia=function(a){return function(b){var c=[N(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ha(b));return c}},ta=function(){return function(a){var b=
-[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b}},ha=function(a,b){return N(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/
+a},null,d)];b&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ga(g));return f}},Ia=function(a){return function(b){var c=[N(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ga(b));return c}},sa=function(){return function(a){var b=
+[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b}},ga=function(a,b){return N(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/
100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},N=function(a,b,c,d,e,g){var f=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);
-f.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};f.getPosition=c;f.setPosition=d;f.ignoreGrid=null!=e?e:!0;if(g){var h=f.positionChanged;f.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return f},xa={link:function(a){return[Ha(a,!0,10),Ha(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,
+f.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};f.getPosition=c;f.setPosition=d;f.ignoreGrid=null!=e?e:!0;if(g){var h=f.positionChanged;f.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return f},xa={link:function(a){return[Ha(a,!0,10),Ha(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,
["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=
-Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(b,c,d,e,g){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*
+parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*
a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
-b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=
+b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,g){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(g+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(g+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,g,f,h,k){c=
Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,f.x,f.y,h.x,h.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[N(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),
-b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ha(a,c/2))}return b},
-label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var b=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
-"width",J.prototype.width))),c=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[N(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",r.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},cross:function(a){return[N(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ga(a,c/2))}return b},
+label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var b=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",K.prototype.width))),c=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[N(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",r.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},cross:function(a){return[N(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
-[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",X.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},dataStorage:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));
+[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",X.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},dataStorage:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));
return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[N(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
(b.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},internalStorage:function(a){var b=[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
-b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},corner:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},internalStorage:function(a){var b=[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},corner:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,b.y-a.y)))})]},singleArrow:ka(1),doubleArrow:ka(.5),folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
+Math.min(a.height,b.y-a.y)))})]},singleArrow:ja(1),doubleArrow:ja(.5),folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));
-return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(v.prototype.size,!0,null,!0,v.prototype.fixedSize),hexagon:wa(y.prototype.size,!0,.5,!0),curlyBracket:wa(n.prototype.size,!1),display:wa(qa.prototype.size,!1),cube:Ea(1,a.prototype.size,!1),card:Ea(.5,g.prototype.size,!0),loopLimit:Ea(.5,Y.prototype.size,!0),trapezoid:Ia(.5),parallelogram:Ia(1)};Graph.createHandle=N;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:wa(v.prototype.size,!0,null,!0,v.prototype.fixedSize),hexagon:wa(z.prototype.size,!0,.5,!0),curlyBracket:wa(n.prototype.size,!1),display:wa(pa.prototype.size,!1),cube:Ea(1,a.prototype.size,!1),card:Ea(.5,g.prototype.size,!0),loopLimit:Ea(.5,Y.prototype.size,!0),trapezoid:Ia(.5),parallelogram:Ia(1)};Graph.createHandle=N;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles=
function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=xa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=xa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
-this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=xa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,0),ka=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,Math.cos(ka),Math.sin(ka)),ka=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(ka),Math.sin(ka));mxEdgeStyle.IsometricConnector=function(a,b,
-c,d,e){var g=a.view;d=null!=d&&0<d.length?d[0]:null;var f=a.absolutePoints,h=f[0],f=f[f.length-1];null!=d&&(d=g.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ya.x,l=ya.y,m=za.x,p=za.y,n="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(p*a-m*d)/(k*p-l*m);a=(l*a-k*d)/(l*m-k*p);n?(c&&(q=new mxPoint(q.x+k*b,q.y+l*
-b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+p*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+p*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(f.x-h.x)/2,h.y+(f.y-h.y)/2));a(d.x,d.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Oa.apply(this,
-arguments)};c.prototype.constraints=[];d.prototype.constraints=[];w.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
-.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
-1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;
-a.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=
-mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,
-.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,
-0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,
-0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,
-.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];O.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=xa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,0),ja=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,Math.cos(ja),Math.sin(ja)),ja=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(ja),Math.sin(ja));mxEdgeStyle.IsometricConnector=function(a,b,
+c,d,e){var g=a.view;d=null!=d&&0<d.length?d[0]:null;var f=a.absolutePoints,h=f[0],f=f[f.length-1];null!=d&&(d=g.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==f&&null!=c&&(f=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ya.x,l=ya.y,m=za.x,p=za.y,n="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=h){a=function(a,b,c){a-=y.x;var d=b-y.y;b=(p*a-m*d)/(k*p-l*m);a=(l*a-k*d)/(l*m-k*p);n?(c&&(y=new mxPoint(y.x+k*b,y.y+l*
+b),e.push(y)),y=new mxPoint(y.x+m*a,y.y+p*a)):(c&&(y=new mxPoint(y.x+m*a,y.y+p*a),e.push(y)),y=new mxPoint(y.x+k*b,y.y+l*b));e.push(y)};var y=h;null==d&&(d=new mxPoint(h.x+(f.x-h.x)/2,h.y+(f.y-h.y)/2));a(d.x,d.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Oa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Oa.apply(this,
+arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,
+"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),
+!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,
+1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;
+f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};g.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(c-d)));return a};h.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;V.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;
+ua.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};Y.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,
+.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
+.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,
+.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,
+.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
+1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,
.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ba.prototype.constraints=null;aa.prototype.constraints=null;ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];F.prototype.constraints=null;fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ba.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};aa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+1),!1)];R.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};ka.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",R.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,c));return a};oa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,g=d+e,f=(b-e)/2,e=f+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d));return a};G.prototype.constraints=null;ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,
+.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){b.escape();var c=b.getDeletableCells(b.getSelectionCells());if(null!=c&&0<c.length){var d=b.model.getParents(c);b.removeCells(c,a);if(null!=d){a=[];for(c=0;c<d.length;c++)b.model.contains(d[c])&&(b.model.isVertex(d[c])||b.model.isEdge(d[c]))&&a.push(d[c]);b.setSelectionCells(a)}}}var c=this.editorUi,d=c.editor,b=d.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",function(){b.openLink(c.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);d.graph.setSelectionCells(d.graph.importGraphModel(c.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}));c.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=f;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
@@ -3237,11 +3256,11 @@ c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="borde
"pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<l.length;c++){if(l[c]==a){m[c]=null;g.table.deleteRow(b+(null!=n?1:0));break}null!=m[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},h=function(a,b,c){l[a]=b;m[a]=g.addTextarea(l[p]+":",c,2);m[a].style.width="100%";u(m[a],b)},q=[],r=f.getModel().getParent(c)==f.getModel().getRoot(),t=0;t<k.length;t++)!r&&"label"==k[t].nodeName||"placeholders"==k[t].nodeName||
q.push({name:k[t].nodeName,value:k[t].nodeValue});q.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});null!=n&&(k=document.createElement("input"),k.style.width="280px",k.style.textAlign="center",k.setAttribute("type","text"),k.setAttribute("readOnly","true"),k.setAttribute("value",n),g.addField(mxResources.get("id")+":",k));for(t=0;t<q.length;t++)h(p,q[t].name,q[t].value),p++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;";
h.appendChild(g.table);q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.marginTop="6px";var w=document.createElement("input");w.setAttribute("placeholder",mxResources.get("enterPropertyName"));w.setAttribute("type","text");w.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"18":"22");w.style.marginLeft="2px";q.appendChild(w);h.appendChild(q);b.appendChild(h);var v=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(0<a.length&&"label"!=a&&"placeholders"!=
-a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);u(c,a);c.focus()}w.value=""}catch(D){mxUtils.alert(D)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<m.length?m[0].focus():w.focus()};v.setAttribute("disabled","disabled");v.style.marginLeft="10px";v.style.width="144px";q.appendChild(v);h=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";q=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(C){mxUtils.alert(C)}});q.className="geBtn gePrimaryBtn";mxEvent.addListener(w,
+a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);u(c,a);c.focus()}w.value=""}catch(E){mxUtils.alert(E)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<m.length?m[0].focus():w.focus()};v.setAttribute("disabled","disabled");v.style.marginLeft="10px";v.style.width="144px";q.appendChild(v);h=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";q=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(D){mxUtils.alert(D)}});q.className="geBtn gePrimaryBtn";mxEvent.addListener(w,
"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){r=document.createElement("span");r.style.marginRight="10px";t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);
-mxEvent.addListener(t,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});r.appendChild(t);mxUtils.write(r,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){t=document.createElement("a");t.setAttribute("href",EditDataDialog.placeholderHelpLink);t.setAttribute("title",mxResources.get("help"));t.setAttribute("target","_blank");t.style.marginLeft="8px";t.style.cursor="help";var y=document.createElement("img");
-mxUtils.setOpacity(y,50);y.style.height="16px";y.style.width="16px";y.setAttribute("border","0");y.setAttribute("valign","middle");y.style.marginTop=mxClient.IS_IE11?"0px":"-4px";y.setAttribute("src",Editor.helpImage);t.appendChild(y);r.appendChild(t)}k.appendChild(r)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(q)):(k.appendChild(q),k.appendChild(h));b.appendChild(k);this.container=b};
+mxEvent.addListener(t,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});r.appendChild(t);mxUtils.write(r,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){t=document.createElement("a");t.setAttribute("href",EditDataDialog.placeholderHelpLink);t.setAttribute("title",mxResources.get("help"));t.setAttribute("target","_blank");t.style.marginLeft="8px";t.style.cursor="help";var z=document.createElement("img");
+mxUtils.setOpacity(z,50);z.style.height="16px";z.style.width="16px";z.setAttribute("border","0");z.setAttribute("valign","middle");z.style.marginTop=mxClient.IS_IE11?"0px":"-4px";z.setAttribute("src",Editor.helpImage);t.appendChild(z);r.appendChild(t)}k.appendChild(r)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(q)):(k.appendChild(q),k.appendChild(h));b.appendChild(k);this.container=b};
EditDataDialog.getDisplayIdForCell=function(a,c){var d=null;null!=a.editor.graph.getModel().getParent(c)&&(d=c.getId());return d};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,c,d,b){var f=document.createElement("div");mxUtils.write(f,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type",
"text");h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
@@ -3261,14 +3280,14 @@ Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEven
b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9660;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,
a-1);mxEvent.consume(b)})),0<=a&&a<u-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&
(f.setAttribute("draggable","true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="white"==Dialog.backdropColor?"#e6eff8":"#505759",f.style.fontWeight=g.isEnabled()?"bold":"",q=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}u=g.model.getChildCount(g.model.root);
-m.innerHTML="";for(var b=u-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));var c=g.convertValueToString(q)||mxResources.get("background");t.setAttribute("title",mxResources.get("removeIt",[c]));w.setAttribute("title",mxResources.get("moveSelectionTo",[c]));y.setAttribute("title",mxResources.get("duplicateIt",[c]));v.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}
+m.innerHTML="";for(var b=u-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));var c=g.convertValueToString(q)||mxResources.get("background");t.setAttribute("title",mxResources.get("removeIt",[c]));w.setAttribute("title",mxResources.get("moveSelectionTo",[c]));z.setAttribute("title",mxResources.get("duplicateIt",[c]));v.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}
console.log("dialog.bg",Dialog.backdropColor);var g=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="white"==Dialog.backdropColor?"#dcdcdc":Dialog.backdropColor;m.style.position="absolute";
m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px";k.appendChild(m);var p=null,n=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";n=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var u=null,q=null,r=document.createElement("div");r.className="geToolbarContainer";r.style.position="absolute";r.style.bottom="0px";r.style.left="0px";
r.style.right="0px";r.style.height=l;r.style.overflow="hidden";r.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";r.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;r.style.borderWidth="1px 0px 0px 0px";r.style.borderColor="#c3c3c3";r.style.borderStyle="solid";r.style.display="block";r.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(r.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var t=
l.cloneNode();t.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(t,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(q);g.removeCells([q],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});
g.isEnabled()||(t.className="geButton mxDisabled");r.appendChild(t);var w=l.cloneNode();w.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(a){g.isEnabled()&&!g.isSelectionEmpty()&&g.moveCells(g.getSelectionCells(),0,0,!1,q)});r.appendChild(w);var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(v,"click",
-function(b){g.isEnabled()&&a.showDataDialog(q);mxEvent.consume(b)});g.isEnabled()||(v.className="geButton mxDisabled");r.appendChild(v);var y=l.cloneNode();y.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(y,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(q),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==
-a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(y.className="geButton mxDisabled");r.appendChild(y);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||
+function(b){g.isEnabled()&&a.showDataDialog(q);mxEvent.consume(b)});g.isEnabled()||(v.className="geButton mxDisabled");r.appendChild(v);var z=l.cloneNode();z.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(z,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(q),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==
+a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(z.className="geButton mxDisabled");r.appendChild(z);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||
(l.className="geButton mxDisabled");r.appendChild(l);k.appendChild(r);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?w.className="geButton mxDisabled":w.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var x=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();
this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",x);this.destroy=function(){mxEvent.removeListener(window,"resize",x);this.window.destroy()}};
@@ -7399,27 +7418,28 @@ this.getTagsForStencil("mxgraph.weblogos","xanga","web logos logo").join(" ")),t
74.4,43.6,"","Yahoo",null,null,this.getTagsForStencil("mxgraph.weblogos","yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yahoo_2;fillColor=#65106E;strokeColor=none",80,46.6,"","Yahoo",null,null,this.getTagsForStencil("mxgraph.weblogos","yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+
"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos","yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",
76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))])}})();
-DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=c||"";this.stats={joined:0,merged:0,lastMerge:0,lastMergeTime:0,lastOpenTime:0,shadowState:0,opened:0,closed:0,destroyed:0,fileMerged:0,fileSaved:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+DrawioFile=function(a,c){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=c||"";this.stats={joined:0,merged:0,lastMerge:0,lastMergeTime:0,lastOpenTime:0,lastIgnored:0,shadowState:0,opened:0,closed:0,destroyed:0,fileMerged:0,fileSaved:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;
DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
-DrawioFile.prototype.updateFile=function(a,c,b,f){null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c(e):this.getLatestVersion(mxUtils.bind(this,function(h){try{null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c(e):null!=h?this.mergeFile(h,a,c,f):this.reloadFile(a,c))}catch(k){null!=c&&c(k)}}),c))};
-DrawioFile.prototype.mergeFile=function(a,c,b,f){try{this.stats.fileMerged++;var h=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkPages(h,"mergeFile init");this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(h,this.ui.pages):null;var k=[this.ui.diffPages(null!=f?f:h,this.shadowPages)];if(this.ignorePatches(k))this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());
-else{var m=this.ui.patchPages(h,k[0]);this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());this.checkPages(m,"mergeFile patched");f={};var p=this.ui.getHashValueForPages(m,f),h={},t=this.ui.getHashValueForPages(this.shadowPages,h);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",k,"checksum",t==p,p);if(null!=p&&p!=t){var d=this.compressReportData(this.getAnonymizedXmlForPages(m));this.checksumError(b,k,(null!=f?"Details: "+JSON.stringify(f):"")+
-"\nChecksum: "+p+"\nCurrent: "+t+(null!=h?"\nCurrent Details: "+JSON.stringify(h):"")+"\nPatched:\n"+d);return}this.patch(k,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages(this.ui.pages,"mergeFile done")}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(g){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=b&&b(g);try{this.sendErrorReport("Error in mergeFile",
-null,g)}catch(n){}}};DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),b=c.document.createElement("mxfile");if(null!=a)for(var f=0;f<a.length;f++){var h=c.encode(new mxGraphModel(a[f].root));"1"!=urlParams.dev&&(h=this.ui.anonymizeNode(h,!0));h.setAttribute("id",a[f].getId());a[f].viewState&&this.ui.editor.graph.saveViewState(a[f].viewState,h,!0);b.appendChild(h)}return mxUtils.getPrettyXml(b)};
+DrawioFile.prototype.updateFile=function(a,c,b,f){null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c(e):this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=b&&b()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c(e):null!=k?this.mergeFile(k,a,c,f):this.reloadFile(a,c))}catch(h){null!=c&&c(h)}}),c))};
+DrawioFile.prototype.mergeFile=function(a,c,b,f){try{this.stats.fileMerged++;var k=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkPages(k,"mergeFile init");var h=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=h&&0<h.length){this.shadowPages=h;this.backupPatch=this.isModified()?this.ui.diffPages(k,this.ui.pages):null;var m=[this.ui.diffPages(null!=f?f:k,this.shadowPages)];if(this.ignorePatches(m))this.stats.shadowState=
+this.ui.hashValue(a.getCurrentEtag());else{var t=this.ui.patchPages(k,m[0]);this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());this.checkPages(t,"mergeFile patched");f={};var p=this.ui.getHashValueForPages(t,f),k={},d=this.ui.getHashValueForPages(this.shadowPages,k);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",m,"checksum",d==p,p);if(null!=p&&p!=d){var g=this.compressReportData(this.getAnonymizedXmlForPages(t));this.checksumError(b,m,(null!=
+f?"Details: "+JSON.stringify(f):"")+"\nChecksum: "+p+"\nCurrent: "+d+(null!=k?"\nCurrent Details: "+JSON.stringify(k):"")+"\nPatched:\n"+g);return}this.patch(m,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages(this.ui.pages,"mergeFile done")}}else try{0==this.stats.lastIgnored&&this.sendErrorReport("Ignored empty pages in mergeFile","File Data: "+this.compressReportData(this.ui.anonymizeString(a.data),null,500)),this.stats.lastIgnored=(new Date).toISOString()}catch(n){}this.inConflictState=
+this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=b&&b(n);try{this.sendErrorReport("Error in mergeFile",null,n)}catch(q){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),b=c.document.createElement("mxfile");if(null!=a)for(var f=0;f<a.length;f++){var k=c.encode(new mxGraphModel(a[f].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[f].getId());a[f].viewState&&this.ui.editor.graph.saveViewState(a[f].viewState,k,!0);b.appendChild(k)}return mxUtils.getPrettyXml(b)};
DrawioFile.prototype.checkPages=function(a,c){if(this.ui.getCurrentFile()==this&&(null==a||0==a.length)){var b=null==this.shadowData?"null":this.compressReportData(this.ui.anonymizeString(this.shadowData),null,5E3);this.sendErrorReport("Pages is null or empty","Shadow: "+(null!=a?a.length:"null")+"\nShadowPages: "+(null!=this.shadowPages?this.shadowPages.length:"null")+(null!=c?"\nInfo: "+c:"")+"\nShadowData: "+b)}};
DrawioFile.prototype.compressReportData=function(a,c,b){null!=a&&a.length>(null!=c?c:1E4)&&(a=this.ui.editor.graph.compress(a)+"\n");null!=b&&null!=a&&a.length>b&&(a=a.substring(0,b)+"[...]");return a};
-DrawioFile.prototype.checksumError=function(a,c,b,f){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var h=Error(),k=mxUtils.bind(this,function(a){var f=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+f+(null!=a?"\n\nHeadRevision:\n"+a:""),h,7E4)});null==f?k(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==f?k(a):k(null)}),function(){})}catch(m){}};
-DrawioFile.prototype.sendErrorReport=function(a,c,b,f){try{var h=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),k=this.getCurrentUser(),m=null!=k?this.ui.hashValue(k.id):"unknown",p=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var t=this.getTitle(),d=t.lastIndexOf("."),k="xml";0<d&&(k=t.substring(d));var g=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+
-" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+k+")\nUser="+m+" ("+p+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+(null!=b?"\nError="+b:"")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nShadow:\n"+h+"\n\nStack:\n"+g,f)}catch(n){}};
-DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var b=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),k=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(k,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=this.stats);
+DrawioFile.prototype.checksumError=function(a,c,b,f){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var k=Error(),h=mxUtils.bind(this,function(a){var f=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+f+(null!=a?"\n\nMaster:\n"+a:""),k,7E4)});null==f?h(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==f?h(a):h(null)}),function(){})}catch(m){}};
+DrawioFile.prototype.sendErrorReport=function(a,c,b,f){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),h=this.getCurrentUser(),m=null!=h?this.ui.hashValue(h.id):"unknown",t=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var p=this.getTitle(),d=p.lastIndexOf("."),h="xml";0<d&&(h=p.substring(d));var g=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+
+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+h+")\nUser="+m+" ("+t+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+(null!=b?"\nError="+b:"")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nShadow:\n"+k+"\n\nStack:\n"+g,f)}catch(n){}};
+DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var b=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),h=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(h,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=this.stats);
null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}catch(f){null!=c&&c(f)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,b=0;b<a.length&&c;b++)c=c&&0==Object.keys(a[b]).length;return c};
-DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,f=b.history.slice(),h=b.indexOfNextAdd,k=this.ui.editor.graph;k.container.style.visibility="hidden";var m=this.changeListenerEnabled;this.changeListenerEnabled=!1;var p=k.foldingEnabled,t=k.mathEnabled,d=k.cellRenderer.redraw;k.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());d.apply(this,arguments)};k.model.beginUpdate();try{for(var g=
-0;g<a.length;g++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[g],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{k.model.endUpdate();k.container.style.visibility="";k.cellRenderer.redraw=d;this.changeListenerEnabled=m;b.history=f;b.indexOfNextAdd=h;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)t!=
-k.mathEnabled?(this.ui.editor.updateGraphComponents(),k.refresh()):(p!=k.foldingEnabled?k.view.revalidate():k.view.validate(),k.sizeDidChange()),null!=this.ui.format&&k.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
-DrawioFile.prototype.save=function(a,c,b,f,h,k){if(this.isEditable())if(!h&&this.invalidChecksum)if(null!=b)b({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave();else if(null!=b)b({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};
+DrawioFile.prototype.patch=function(a,c){var b=this.ui.editor.undoManager,f=b.history.slice(),k=b.indexOfNextAdd,h=this.ui.editor.graph;h.container.style.visibility="hidden";var m=this.changeListenerEnabled;this.changeListenerEnabled=!1;var t=h.foldingEnabled,p=h.mathEnabled,d=h.cellRenderer.redraw;h.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());d.apply(this,arguments)};h.model.beginUpdate();try{for(var g=
+0;g<a.length;g++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[g],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{h.model.endUpdate();h.container.style.visibility="";h.cellRenderer.redraw=d;this.changeListenerEnabled=m;b.history=f;b.indexOfNextAdd=k;b.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)p!=
+h.mathEnabled?(this.ui.editor.updateGraphComponents(),h.refresh()):(t!=h.foldingEnabled?h.view.revalidate():h.view.validate(),h.sizeDidChange()),null!=this.ui.format&&h.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
+DrawioFile.prototype.save=function(a,c,b,f,k,h){if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=b)b({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave();else if(null!=b)b({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};
DrawioFile.prototype.saveAs=function(a,c,b){};DrawioFile.prototype.saveFile=function(a,c,b,f){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};
DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,c,b){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,c,b){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.open=function(){this.stats.opened++;this.stats.lastOpenTime=(new Date).toISOString();var a=this.getData();null!=a?(this.ui.setFileData(a),this.isModified()||(this.shadowData=mxUtils.getXml(this.ui.getXmlFileData()),this.shadowPages=null)):this.sendErrorReport("Error in open","Data was null");this.installListeners();this.isSyncSupported()&&this.startSync()};
@@ -7444,119 +7464,120 @@ mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("
b)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,c);else if(this.isModified()&&this.addUnsavedStatus(a),c)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var b=null!=a?null!=a.error?a.error.message:a.message:null;null!=b&&60<b.length&&(b=b.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,c){var b=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),f=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),h=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,b,f,null,!0,this.constructor==GitHubFile&&null!=a?a.commitMessage:null))}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,
-function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,b,f,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),f)});"none"==DrawioFile.SYNC?this.showCopyDialog(b,f,h):this.invalidChecksum?this.showRefreshDialog(b,f,this.getErrorMessage(a)):c?this.showConflictDialog(h,k):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(b,
+DrawioFile.prototype.handleConflictError=function(a,c){var b=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),f=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,b,f,null,!0,this.constructor==GitHubFile&&null!=a?a.commitMessage:null))}),h=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,
+function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,b,f,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),f)});"none"==DrawioFile.SYNC?this.showCopyDialog(b,f,k):this.invalidChecksum?this.showRefreshDialog(b,f,this.getErrorMessage(a)):c?this.showConflictDialog(k,h):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(b,
f)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};
DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null==this.autosaveThread&&this.handleFileSuccess(!0)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus()};
-DrawioFile.prototype.fileSaved=function(a,c,b,f){try{this.stats.fileSaved++,this.invalidChecksum=this.inConflictState=!1,this.checkPages(this.ui.pages,"fileSaved"),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,f)}catch(h){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(h);try{this.sendErrorReport("Error in fileSaved","SavedData:\n"+this.compressReportData(this.ui.anonymizeString(a),
-5E3),h)}catch(k){}}};
-DrawioFile.prototype.autosave=function(a,c,b,f){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<c?a:0;this.clearAutosave();var h=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==h&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=
-b&&b(a)}),mxUtils.bind(this,function(a){null!=f&&f(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=b&&b(null)}),a);this.autosaveThread=h};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.fileSaved=function(a,c,b,f){try{this.stats.fileSaved++,this.invalidChecksum=this.inConflictState=!1,this.checkPages(this.ui.pages,"fileSaved"),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=b&&b()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),c,b,f)}catch(k){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(k);try{this.sendErrorReport("Error in fileSaved","Saved Data:\n"+this.compressReportData(this.ui.anonymizeString(a),
+null,500),k)}catch(h){}}};
+DrawioFile.prototype.autosave=function(a,c,b,f){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<c?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=
+b&&b(a)}),mxUtils.bind(this,function(a){null!=f&&f(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=b&&b(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,c){if(null!=a&&null!=c){var b=a.lastIndexOf("."),f=0<b?a.substring(b):"",b=c.lastIndexOf(".");return f===(0<b?c.substring(b):"")}return a==c};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};
DrawioFile.prototype.destroy=function(){this.stats.destroyed++;try{if(!this.ui.isOffline()&&this.reportEnabled&&("auto"==DrawioFile.SYNC||"manual"==DrawioFile.SYNC)){var a=this.getCurrentUser(),c=null!=a?this.ui.hashValue(a.id):"unknown";this.stats.end=(new Date).toISOString();null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));EditorUi.logEvent({category:"RT-END-"+DrawioFile.SYNC,action:"file-"+this.getId()+"-mode-"+this.getMode()+
"-size-"+this.getSize()+"-user-"+c+(null!=this.sync?"-client-"+this.sync.clientId:""),label:this.stats})}}catch(b){}this.clearAutosave();this.removeListeners();null!=this.sync&&(this.sync.destroy(),this.sync=null)};LocalFile=function(a,c,b,f){DrawioFile.call(this,a,c);this.title=b;this.mode=f?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,c,b){this.saveAs(this.title,c,b)};LocalFile.prototype.saveAs=function(a,c,b){this.saveFile(a,!1,c,b)};
-LocalFile.prototype.saveFile=function(a,c,b,f){this.title=a;this.updateFileData();c=this.getData();var h=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),k=mxUtils.bind(this,function(c){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,a,h?"image/png":"text/xml",h);else if(c.length<MAX_REQUEST_SIZE){var f=a.lastIndexOf("."),f=0<f?a.substring(f+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(a)+
-(h?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));this.setModified(!1);this.contentChanged();null!=b&&b()});h?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),f,this.ui.getCurrentFile()!=this?this.getData():null):k(c)};LocalFile.prototype.rename=function(a,c,b){this.title=a;this.descriptorChanged();null!=c&&c()};
+LocalFile.prototype.saveFile=function(a,c,b,f){this.title=a;this.updateFileData();c=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),h=mxUtils.bind(this,function(c){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,a,k?"image/png":"text/xml",k);else if(c.length<MAX_REQUEST_SIZE){var f=a.lastIndexOf("."),f=0<f?a.substring(f+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(a)+
+(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));this.setModified(!1);this.contentChanged();null!=b&&b()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){h(a)}),f,this.ui.getCurrentFile()!=this?this.getData():null):h(c)};LocalFile.prototype.rename=function(a,c,b){this.title=a;this.descriptorChanged();null!=c&&c()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(a,c,b){LocalFile.call(this,a,c,b)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,c,b){this.saveFile(a,!1,c,b)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,c,b){DrawioFile.call(this,a,c);this.title=b};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(a,c,b){this.saveAs(this.getTitle(),c,b)};StorageFile.prototype.saveAs=function(a,c,b){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,c,b)};
-StorageFile.prototype.saveFile=function(a,c,b,f){if(this.isEditable()){var h=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=b&&b()}))}catch(k){null!=f&&f(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=f?f({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(b){this.isRenamable()&&this.getTitle()!=a&&null!=b?this.ui.confirm(mxResources.get("replaceIt",
-[a]),h,f):h()}))}else null!=b&&b()};StorageFile.prototype.rename=function(a,c,b){var f=this.getTitle();f!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(h){var k=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(f,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(f,c)}),b)});null!=h?this.ui.confirm(mxResources.get("replaceIt",[a]),k,b):k()})):c()};
+StorageFile.prototype.saveFile=function(a,c,b,f){if(this.isEditable()){var k=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=b&&b()}))}catch(h){null!=f&&f(h)}});this.isRenamable()&&"."==a.charAt(0)&&null!=f?f({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(b){this.isRenamable()&&this.getTitle()!=a&&null!=b?this.ui.confirm(mxResources.get("replaceIt",
+[a]),k,f):k()}))}else null!=b&&b()};StorageFile.prototype.rename=function(a,c,b){var f=this.getTitle();f!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(k){var h=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(f,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(f,c)}),b)});null!=k?this.ui.confirm(mxResources.get("replaceIt",[a]),h,b):h()})):c()};
StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.getLatestVersion=function(a,c){this.ui.getLocalData(this.title,mxUtils.bind(this,function(b){a(new StorageFile(this.ui,b,this.title))}))};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,c,b){StorageFile.call(this,a,c,b)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,c,b){this.saveFile(a,!1,c,b)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(a,c,b){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,c,b){StorageFile.call(this,a,c,b);a=b;c=a.lastIndexOf("/");0<=c&&(a=a.substring(c+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,c,b){return!1};UrlLibrary.prototype.saveAs=function(a,c,b){};UrlLibrary.prototype.open=function(){};/*
mxClient.IS_IOS || */
-var StorageDialog=function(a,c,b){function f(q,u,l,f,z,v){function w(){mxEvent.addListener(x,"click",null!=v?v:function(){l!=App.MODE_GOOGLE||a.isDriveDomain()?l==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(l,d.checked);c()})):(a.setMode(l,d.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height="100px";x.style.whiteSpace="nowrap";x.setAttribute("title",u);mxClient.IS_QUIRKS&&(x.style.cssFloat="left",x.style.zoom="1");var E=document.createElement("div");E.style.textOverflow="ellipsis";E.style.overflow="hidden";if(null!=q){var h=document.createElement("img");
-h.setAttribute("src",q);h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="60px";h.style.height="60px";h.style.paddingBottom="6px";x.appendChild(h)}else E.style.paddingTop="5px",E.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(E.style.paddingTop="0px",E.style.marginTop="-2px");x.appendChild(E);mxUtils.write(E,u);if(null!=z)for(q=0;q<z.length;q++)mxUtils.br(E),mxUtils.write(E,z[q]);if(null!=f&&null==a[f]){h.style.visibility=
-"hidden";mxUtils.setOpacity(E,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(x);var y=window.setTimeout(function(){null==a[f]&&(k.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[f]&&(window.clearTimeout(y),mxUtils.setOpacity(E,100),h.style.visibility="",k.stop(),w(),"drive"==f&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else w();
-t.appendChild(x);++g>=b&&(mxUtils.br(t),g=0)}b=null!=b?b:2;var h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";h.style.paddingTop="0px";h.style.paddingBottom="20px";var k=a.addLanguageMenu(h,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://about.draw.io/support/");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target","_blank");k.style.position=
-"absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var m=document.createElement("img");mxUtils.setOpacity(m,50);m.style.height="16px";m.style.width="16px";m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);m.style.marginRight="2px";k.appendChild(m);mxUtils.write(k,mxResources.get("help"));h.appendChild(k)}var p=document.createElement("div");p.style.position=
-"absolute";p.style.cursor="pointer";p.style.fontSize="12px";p.style.bottom="28px";p.style.color="gray";mxUtils.write(p,mxResources.get("decideLater"));a.isOfflineApp()?p.style.right="20px":(mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0)"),p.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)p.style.marginLeft=-Math.round(p.clientWidth/2)+"px"};h.appendChild(p);mxEvent.addListener(p,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;
-a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var t=document.createElement("div");mxClient.IS_QUIRKS&&(t.style.whiteSpace="nowrap",t.style.cssFloat="left");t.style.border="1px solid #d3d3d3";t.style.borderWidth="1px 0px 1px 0px";t.style.padding="12px 0px 12px 0px";var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;var g=0,n=document.createElement("p"),k=document.createElement("p");
-k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");h.appendChild(k);"function"===typeof window.DriveClient&&f(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");f(IMAGE_PATH+"/osa_drive-harddisk.png",
-mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||f(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);h.appendChild(t);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(d);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));k.appendChild(m);mxUtils.br(k);var q=a.getRecent();if(null!=q&&
-0<q.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var v=document.createElement("option");v.setAttribute("value","");v.setAttribute("selected","selected");v.style.textAlign="center";mxUtils.write(v,mxResources.get("openRecent")+"...");u.appendChild(v);for(v=0;v<q.length;v++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var d=document.createElement("option");d.setAttribute("value",a.id);mxUtils.write(d,
-a.title+" ("+mxResources.get(b)+")");u.appendChild(d)})(q[v]);k.appendChild(u);mxEvent.addListener(u,"change",function(b){""!=u.value&&a.loadFile(u.value)})}else k.style.marginTop="20px",t.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
-", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),k.appendChild(q),t.style.paddingBottom="4px");t.appendChild(k);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
-document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",h.appendChild(n))},5E3);this.container=
-h},SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";a.addLanguageMenu(c,!0);var b=null,b=a.getServiceCount();if(!a.isOffline()&&1<b){b=document.createElement("a");b.setAttribute("href","https://about.draw.io/support/");b.setAttribute("title",mxResources.get("help"));b.setAttribute("target","_blank");b.style.position="absolute";b.style.fontSize="12px";b.style.textDecoration="none";b.style.cursor="pointer";b.style.bottom="22px";b.style.left="26px";b.style.color=
-"gray";var f=document.createElement("img");mxUtils.setOpacity(f,50);f.style.height="16px";f.style.width="16px";f.setAttribute("border","0");f.setAttribute("valign","bottom");f.setAttribute("src",Editor.helpImage);f.style.marginRight="2px";b.appendChild(f);mxUtils.write(b,mxResources.get("help"));c.appendChild(b)}b=document.createElement("p");b.style.fontSize="16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";f=document.createElement("img");f.setAttribute("border",
-"0");f.setAttribute("align","absmiddle");f.style.width="40px";f.style.height="40px";f.style.marginRight="12px";f.style.paddingBottom="4px";var h="";a.mode==App.MODE_GOOGLE?(f.src=IMAGE_PATH+"/google-drive-logo.svg",h=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(f.src=IMAGE_PATH+"/dropbox-logo.svg",h=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(f.src=IMAGE_PATH+"/onedrive-logo.svg",h=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(f.src=IMAGE_PATH+"/github-logo.svg",h=
-mxResources.get("github")):a.mode==App.MODE_TRELLO?(f.src=IMAGE_PATH+"/trello-logo.svg",h=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(f.src=IMAGE_PATH+"/osa_database.png",h=mxResources.get("browser")):(f.src=IMAGE_PATH+"/osa_drive-harddisk.png",h=mxResources.get("device"));var k=document.createElement("div");k.style.margin="4px 0px 0px 0px";var m=document.createElement("button");m.className="geBigButton";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
-(k.style.padding="42px 0px 56px 0px",m.style.marginBottom="12px"):(b.appendChild(f),mxUtils.write(b,h),c.appendChild(b),k.style.border="1px solid #d3d3d3",k.style.borderWidth="1px 0px 1px 0px",k.style.padding="18px 0px 24px 0px",m.style.marginBottom="8px");mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");mxClient.IS_QUIRKS&&(m.style.width="340px");mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){a.hideDialog();a.actions.get("new").funct()});
-k.appendChild(m);mxUtils.br(k);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_QUIRKS&&(m.style.width="340px");mxUtils.write(m,mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){a.actions.get("open").funct()});k.appendChild(m);b="undefined";a.mode==App.MODE_GOOGLE?b=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?b=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?
-b=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?b=mxResources.get("github"):a.mode==App.MODE_TRELLO?b=mxResources.get("trello"):a.mode==App.MODE_DEVICE?b=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(b=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(h=function(b){m.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="inline-block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));
-m.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});k.appendChild(c)},f=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=f?(m.style.marginBottom="24px",h=document.createElement("a"),h.setAttribute("href","javascript:void(0)"),h.style.display="inline-block",h.style.marginTop="6px",mxUtils.write(h,mxResources.get("changeUser")+" ("+f.displayName+")"),m.style.marginBottom="16px",
-k.style.paddingBottom="18px",mxEvent.addListener(h,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),k.appendChild(h)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?h(function(){a.oneDrive.logout()}):
-a.mode==App.MODE_GITHUB&&null!=a.gitHub?h(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&h(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&h(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),mxUtils.br(k),h=document.createElement("a"),h.setAttribute("href","javascript:void(0)"),h.style.display="inline-block",h.style.marginTop="8px",mxUtils.write(h,mxResources.get("notUsingService",
-[b])),mxEvent.addListener(h,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),k.appendChild(h));c.appendChild(k);this.container=c},ConfirmDialog=function(a,c,b,f,h,k,m,p,t){var d=document.createElement("div");d.style.textAlign="center";var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight="44px";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,c);d.appendChild(g);g=document.createElement("div");g.style.textAlign=
-"center";g.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f(n.checked)});k.className="geBtn";null!=p&&(k.innerHTML=p+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&g.appendChild(k);var q=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(n.checked)});g.appendChild(q);
-null!=m?(q.innerHTML=m+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(k);d.appendChild(g);t?(g.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),g.appendChild(h),d.appendChild(g),mxEvent.addListener(h,
-"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):g.style.marginTop="16px";this.init=function(){q.focus()};this.container=d},EmbedDialog=function(a,c,b,f,h,k){f=document.createElement("div");var m=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=k?mxUtils.write(f,k):mxUtils.write(f,mxResources.get(5E5>c.length?m?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(f);k=document.createElement("div");k.style.position="absolute";k.style.top="30px";k.style.right="30px";k.style.color="gray";
-mxUtils.write(k,a.formatFileSize(c.length));f.appendChild(k);var p=document.createElement("textarea");p.setAttribute("autocomplete","off");p.setAttribute("autocorrect","off");p.setAttribute("autocapitalize","off");p.setAttribute("spellcheck","false");p.style.marginTop="10px";p.style.resize="none";p.style.height="150px";p.style.width="440px";p.style.border="1px solid gray";p.value=mxResources.get("updatingDocument");f.appendChild(p);mxUtils.br(f);this.init=function(){window.setTimeout(function(){5E5>
-c.length?(p.value=c,p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):(p.setAttribute("readonly","true"),p.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var t=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!m||navigator.standalone||!(m||mxClient.IS_SVG&&(null==document.documentMode||
-9<document.documentMode))||(t=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var d=5E5>c.length?p.value:c;if(null!=h)h(d);else if(m)try{var g=a.openLink(d);null!=g&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=d.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var f=
-window.open().document;f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>");f.close()}}),t.className="geBtn",k.appendChild(t));if(!m||7500<c.length){var d=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",c,"text/plain")});d.className="geBtn";k.appendChild(d)}if(m&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var g=mxUtils.button("",function(){try{var b=
-"https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img");d.setAttribute("src",Editor.facebookImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border","0");g.appendChild(d);g.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");g.style.verticalAlign="bottom";g.style.paddingTop="4px";g.style.minWidth=
-"46px";g.className="geBtn";k.appendChild(g)}7168>c.length&&(g=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(p.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img"),d.setAttribute("src",Editor.tweetImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom=
-"5px",g.appendChild(d),g.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),g.style.verticalAlign="bottom",g.style.paddingTop="4px",g.style.minWidth="46px",g.className="geBtn",k.appendChild(g))}d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.appendChild(d);g=mxUtils.button(mxResources.get("copy"),function(){p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,
-null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?d.className="geBtn gePrimaryBtn":(k.appendChild(g),g.className="geBtn gePrimaryBtn",d.className="geBtn"):(k.appendChild(t),d.className="geBtn",t.className="geBtn gePrimaryBtn");f.appendChild(k);this.container=f};EmbedDialog.showPreviewOption=!0;
+var StorageDialog=function(a,c,b){function f(q,u,l,f,z,v){function x(){mxEvent.addListener(w,"click",null!=v?v:function(){l!=App.MODE_GOOGLE||a.isDriveDomain()?l==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(l,d.checked);c()})):l==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(l,d.checked);
+c()})):(a.setMode(l,d.checked),c()):window.location.hostname=DriveClient.prototype.newAppHostname})}var w=document.createElement("a");w.style.overflow="hidden";w.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";w.className="geBaseButton";w.style.boxSizing="border-box";w.style.fontSize="11px";w.style.position="relative";w.style.margin="4px";w.style.padding="8px 10px 12px 10px";w.style.width="88px";w.style.height="100px";w.style.whiteSpace="nowrap";w.setAttribute("title",u);mxClient.IS_QUIRKS&&
+(w.style.cssFloat="left",w.style.zoom="1");var E=document.createElement("div");E.style.textOverflow="ellipsis";E.style.overflow="hidden";if(null!=q){var h=document.createElement("img");h.setAttribute("src",q);h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="60px";h.style.height="60px";h.style.paddingBottom="6px";w.appendChild(h)}else E.style.paddingTop="5px",E.style.whiteSpace="normal",mxClient.IS_IOS?(w.style.padding="0px 10px 20px 10px",w.style.top="6px"):mxClient.IS_FF&&
+(E.style.paddingTop="0px",E.style.marginTop="-2px");w.appendChild(E);mxUtils.write(E,u);if(null!=z)for(q=0;q<z.length;q++)mxUtils.br(E),mxUtils.write(E,z[q]);if(null!=f&&null==a[f]){h.style.visibility="hidden";mxUtils.setOpacity(E,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(w);var y=window.setTimeout(function(){null==a[f]&&(k.stop(),w.style.display="none")},3E4);a.addListener("clientLoaded",
+mxUtils.bind(this,function(b,d){null!=a[f]&&d.getProperty("client")==a[f]&&(window.clearTimeout(y),mxUtils.setOpacity(E,100),h.style.visibility="",k.stop(),x(),"drive"==f&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else x();p.appendChild(w);++g>=b&&(mxUtils.br(p),g=0)}b=null!=b?b:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var h=a.addLanguageMenu(k,!0);null!=h&&(h.style.bottom=parseInt("28px")-
+2+"px");if(!a.isOffline()&&1<a.getServiceCount()){h=document.createElement("a");h.setAttribute("href","https://about.draw.io/support/");h.setAttribute("title",mxResources.get("help"));h.setAttribute("target","_blank");h.style.position="absolute";h.style.textDecoration="none";h.style.cursor="pointer";h.style.fontSize="12px";h.style.bottom="28px";h.style.left="26px";h.style.color="gray";var m=document.createElement("img");mxUtils.setOpacity(m,50);m.style.height="16px";m.style.width="16px";m.setAttribute("border",
+"0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);m.style.marginRight="2px";h.appendChild(m);mxUtils.write(h,mxResources.get("help"));k.appendChild(h)}var t=document.createElement("div");t.style.position="absolute";t.style.cursor="pointer";t.style.fontSize="12px";t.style.bottom="28px";t.style.color="gray";mxUtils.write(t,mxResources.get("decideLater"));a.isOfflineApp()?t.style.right="20px":(mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,0)"),t.style.left=
+"50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)t.style.marginLeft=-Math.round(t.clientWidth/2)+"px"};k.appendChild(t);mxEvent.addListener(t,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});var p=document.createElement("div");mxClient.IS_QUIRKS&&(p.style.whiteSpace="nowrap",p.style.cssFloat="left");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";
+p.style.padding="12px 0px 12px 0px";var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;var g=0,n=document.createElement("p"),h=document.createElement("p");h.style.fontSize="16pt";h.style.padding="0px";h.style.paddingTop="4px";h.style.paddingBottom="16px";h.style.margin="0px";h.style.color="gray";mxUtils.write(h,mxResources.get("saveDiagramsTo")+":");k.appendChild(h);"function"===typeof window.DriveClient&&f(IMAGE_PATH+"/google-drive-logo.svg",
+mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");f(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||f(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);k.appendChild(p);h=document.createElement("p");h.style.marginTop="12px";h.style.marginBottom=
+"6px";h.appendChild(d);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));h.appendChild(m);mxUtils.br(h);var q=a.getRecent();if(null!=q&&0<q.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var v=document.createElement("option");v.setAttribute("value","");v.setAttribute("selected","selected");v.style.textAlign="center";mxUtils.write(v,mxResources.get("openRecent")+"...");
+u.appendChild(v);for(v=0;v<q.length;v++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var d=document.createElement("option");d.setAttribute("value",a.id);mxUtils.write(d,a.title+" ("+mxResources.get(b)+")");u.appendChild(d)})(q[v]);h.appendChild(u);mxEvent.addListener(u,"change",function(b){""!=u.value&&a.loadFile(u.value)})}else h.style.marginTop="20px",p.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=
+document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),
+a.openFiles(b.files,!0))});b.click()}),h.appendChild(q),p.style.paddingBottom="4px");p.appendChild(h);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+
+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",k.appendChild(n))},5E3);this.container=k},SplashDialog=function(a){var c=document.createElement("div");c.style.textAlign="center";a.addLanguageMenu(c,!0);var b=null,b=a.getServiceCount();if(!a.isOffline()&&1<b){b=document.createElement("a");b.setAttribute("href","https://about.draw.io/support/");b.setAttribute("title",mxResources.get("help"));b.setAttribute("target","_blank");b.style.position=
+"absolute";b.style.fontSize="12px";b.style.textDecoration="none";b.style.cursor="pointer";b.style.bottom="22px";b.style.left="26px";b.style.color="gray";var f=document.createElement("img");mxUtils.setOpacity(f,50);f.style.height="16px";f.style.width="16px";f.setAttribute("border","0");f.setAttribute("valign","bottom");f.setAttribute("src",Editor.helpImage);f.style.marginRight="2px";b.appendChild(f);mxUtils.write(b,mxResources.get("help"));c.appendChild(b)}b=document.createElement("p");b.style.fontSize=
+"16pt";b.style.padding="0px";b.style.paddingTop="2px";b.style.margin="0px";b.style.color="gray";f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="40px";f.style.height="40px";f.style.marginRight="12px";f.style.paddingBottom="4px";var k="";a.mode==App.MODE_GOOGLE?(f.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(f.src=IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):a.mode==
+App.MODE_ONEDRIVE?(f.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(f.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):a.mode==App.MODE_TRELLO?(f.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(f.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):(f.src=IMAGE_PATH+"/osa_drive-harddisk.png",k=mxResources.get("device"));var h=document.createElement("div");h.style.margin="4px 0px 0px 0px";
+var m=document.createElement("button");m.className="geBigButton";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(h.style.padding="42px 0px 56px 0px",m.style.marginBottom="12px"):(b.appendChild(f),mxUtils.write(b,k),c.appendChild(b),h.style.border="1px solid #d3d3d3",h.style.borderWidth="1px 0px 1px 0px",h.style.padding="18px 0px 24px 0px",m.style.marginBottom="8px");mxClient.IS_QUIRKS&&(h.style.whiteSpace="nowrap",h.style.cssFloat="left");mxClient.IS_QUIRKS&&
+(m.style.width="340px");mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){a.hideDialog();a.actions.get("new").funct()});h.appendChild(m);mxUtils.br(h);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.overflow="hidden";m.style.width="340px";mxClient.IS_QUIRKS&&(m.style.width="340px");mxUtils.write(m,mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){a.actions.get("open").funct()});
+h.appendChild(m);b="undefined";a.mode==App.MODE_GOOGLE?b=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?b=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?b=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?b=mxResources.get("github"):a.mode==App.MODE_TRELLO?b=mxResources.get("trello"):a.mode==App.MODE_DEVICE?b=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(b=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(k=function(b){m.style.marginBottom="24px";
+var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="inline-block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));m.style.marginBottom="16px";h.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});h.appendChild(c)},f=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=f?(m.style.marginBottom="24px",k=document.createElement("a"),k.setAttribute("href",
+"javascript:void(0)"),k.style.display="inline-block",k.style.marginTop="6px",mxUtils.write(k,mxResources.get("changeUser")+" ("+f.displayName+")"),m.style.marginBottom="16px",h.style.paddingBottom="18px",mxEvent.addListener(k,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,
+null,function(){a.hideDialog();a.showSplash()})}))}),h.appendChild(k)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?k(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?k(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&k(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&k(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),mxUtils.br(h),
+k=document.createElement("a"),k.setAttribute("href","javascript:void(0)"),k.style.display="inline-block",k.style.marginTop="8px",mxUtils.write(k,mxResources.get("notUsingService",[b])),mxEvent.addListener(k,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),h.appendChild(k));c.appendChild(h);this.container=c},ConfirmDialog=function(a,c,b,f,k,h,m,t,p){var d=document.createElement("div");d.style.textAlign="center";var g=document.createElement("div");g.style.padding=
+"6px";g.style.overflow="auto";g.style.maxHeight="44px";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,c);d.appendChild(g);g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");h=mxUtils.button(h||mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f(n.checked)});h.className="geBtn";null!=t&&(h.innerHTML=t+"<br>"+h.innerHTML,h.style.paddingBottom="8px",h.style.paddingTop="8px",
+h.style.height="auto",h.style.width="40%");a.editor.cancelFirst&&g.appendChild(h);var q=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b(n.checked)});g.appendChild(q);null!=m?(q.innerHTML=m+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(h);d.appendChild(g);p?(g.style.marginTop="10px",g=document.createElement("p"),
+g.style.marginTop="20px",g.appendChild(n),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),g.appendChild(k),d.appendChild(g),mxEvent.addListener(k,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):g.style.marginTop="16px";this.init=function(){q.focus()};this.container=d},EmbedDialog=function(a,c,b,f,k,h){f=document.createElement("div");var m=/^https?:\/\//.test(c)||/^mailto:\/\//.test(c);null!=h?mxUtils.write(f,h):mxUtils.write(f,mxResources.get(5E5>
+c.length?m?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(f);h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(c.length));f.appendChild(h);var t=document.createElement("textarea");t.setAttribute("autocomplete","off");t.setAttribute("autocorrect","off");t.setAttribute("autocapitalize","off");t.setAttribute("spellcheck","false");t.style.marginTop="10px";t.style.resize="none";t.style.height="150px";
+t.style.width="440px";t.style.border="1px solid gray";t.value=mxResources.get("updatingDocument");f.appendChild(t);mxUtils.br(f);this.init=function(){window.setTimeout(function(){5E5>c.length?(t.value=c,t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)):(t.setAttribute("readonly","true"),t.value=c.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position=
+"absolute";h.style.bottom="36px";h.style.right="32px";var p=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!m||navigator.standalone||!(m||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(p=mxUtils.button(mxResources.get(5E5>c.length?"preview":"openInNewWindow"),function(){var d=5E5>c.length?t.value:c;if(null!=k)k(d);else if(m)try{var g=a.openLink(d);null!=g&&(null==b||0<b)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,
+8)!=d.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),b||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var f=window.open().document;f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+c+"</body></html>");f.close()}}),p.className="geBtn",h.appendChild(p));if(!m||7500<c.length){var d=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();
+a.saveData("embed.txt","txt",c,"text/plain")});d.className="geBtn";h.appendChild(d)}if(m&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>c.length){var g=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(t.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img");d.setAttribute("src",Editor.facebookImage);d.setAttribute("width","18");d.setAttribute("height","18");d.setAttribute("border",
+"0");g.appendChild(d);g.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");g.style.verticalAlign="bottom";g.style.paddingTop="4px";g.style.minWidth="46px";g.className="geBtn";h.appendChild(g)}7168>c.length&&(g=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(t.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),
+d=document.createElement("img"),d.setAttribute("src",Editor.tweetImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom="5px",g.appendChild(d),g.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),g.style.verticalAlign="bottom",g.style.paddingTop="4px",g.style.minWidth="46px",g.className="geBtn",h.appendChild(g))}d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(d);g=mxUtils.button(mxResources.get("copy"),
+function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>c.length?mxClient.IS_SF||null!=document.documentMode?d.className="geBtn gePrimaryBtn":(h.appendChild(g),g.className="geBtn gePrimaryBtn",d.className="geBtn"):(h.appendChild(p),d.className="geBtn",p.className="geBtn gePrimaryBtn");f.appendChild(h);this.container=f};
+EmbedDialog.showPreviewOption=!0;
var GoogleSitesDialog=function(a,c){function b(){var a=null!=B&&null!=B.getTitle()?B.getTitle():this.defaultFilename;if(E.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<C.length&&(b+="&s="+C);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(w.checked?"1":"0");b+="&fit="+(z.checked?"1":"0");
-b+="&resize="+(x.checked?"1":"0");b+="&x0="+Number(g.value);b+="&y0="+t;h.mathEnabled&&(b+="&math=1");l.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=b}else B.constructor==DriveFile||B.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=B.getHash().substring(1),b=B.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
-a&&(b+="&title="+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(g.value),b+="&height="+a),d.value=b):d.value=""}var f=document.createElement("div"),h=a.editor.graph,k=h.getGraphBounds(),m=h.view.scale,p=Math.floor(k.x/m-h.view.translate.x),t=Math.floor(k.y/m-h.view.translate.y);mxUtils.write(f,mxResources.get("googleGadget")+":");mxUtils.br(f);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";
-f.appendChild(d);mxUtils.br(f);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(f,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=p;f.appendChild(g);mxUtils.write(f,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type",
-"text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(k.height/m);f.appendChild(n);mxUtils.br(f);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";f.appendChild(k);mxUtils.write(f,mxResources.get("publicDiagramUrl")+":");mxUtils.br(f);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=c||"";
+b+="&resize="+(x.checked?"1":"0");b+="&x0="+Number(g.value);b+="&y0="+p;k.mathEnabled&&(b+="&math=1");l.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=b}else B.constructor==DriveFile||B.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=B.getHash().substring(1),b=B.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+a&&(b+="&title="+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(g.value),b+="&height="+a),d.value=b):d.value=""}var f=document.createElement("div"),k=a.editor.graph,h=k.getGraphBounds(),m=k.view.scale,t=Math.floor(h.x/m-k.view.translate.x),p=Math.floor(h.y/m-k.view.translate.y);mxUtils.write(f,mxResources.get("googleGadget")+":");mxUtils.br(f);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";
+f.appendChild(d);mxUtils.br(f);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(f,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=t;f.appendChild(g);mxUtils.write(f,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type",
+"text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(h.height/m);f.appendChild(n);mxUtils.br(f);h=document.createElement("hr");h.setAttribute("size","1");h.style.marginBottom="16px";h.style.marginTop="16px";f.appendChild(h);mxUtils.write(f,mxResources.get("publicDiagramUrl")+":");mxUtils.br(f);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=c||"";
f.appendChild(q);mxUtils.br(f);mxUtils.write(f,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";f.appendChild(u);mxUtils.br(f);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";f.appendChild(v);mxUtils.write(f,mxResources.get("pan")+" ");var w=document.createElement("input");
w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";f.appendChild(w);mxUtils.write(f,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);f.appendChild(y);mxUtils.write(f,mxResources.get("edit")+" ");var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginLeft="8px";f.appendChild(l);mxUtils.write(f,
mxResources.get("asNew")+" ");mxUtils.br(f);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";f.appendChild(x);mxUtils.write(f,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";f.appendChild(z);mxUtils.write(f,mxResources.get("fit")+" ");var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginLeft=
"8px";f.appendChild(E);mxUtils.write(f,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),B=a.getCurrentFile();mxEvent.addListener(v,"change",b);mxEvent.addListener(w,"change",b);mxEvent.addListener(x,"change",b);mxEvent.addListener(z,"change",b);mxEvent.addListener(y,"change",b);mxEvent.addListener(l,"change",b);mxEvent.addListener(E,"change",b);mxEvent.addListener(n,"change",b);mxEvent.addListener(g,"change",b);mxEvent.addListener(u,"change",b);mxEvent.addListener(q,"change",b);b();
-mxEvent.addListener(d,"click",function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";k.appendChild(m);f.appendChild(k);this.container=f},CreateGraphDialog=function(a,c,b){var f=document.createElement("div");f.style.textAlign=
-"right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);f.appendChild(c);var k=new Graph(c);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";k.cellRenderer.installCellOverlayListeners=
-function(a,b,d){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(d.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(d){b.fireEvent(new mxEventObject("pointerdown","event",d,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(d.node,"touchstart",function(d){b.fireEvent(new mxEventObject("pointerdown","event",d,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
-!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var p=k.getDefaultParent(),t=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){k.connectionHandler.reset();k.clearSelection();var g=k.getCellGeometry(a),l;n(function(){l=k.insertVertex(p,null,"Entry",g.x,g.y,80,30,"rounded=1;");t(l);k.view.refresh(l);
-k.insertEdge(p,null,"",a,l,m)},function(){k.scrollCellToVisible(l)})});b.addListener("pointerdown",function(a,b){var d=b.getProperty("event"),g=b.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var l=mxUtils.convertPoint(k.container,mxEvent.getClientX(d),mxEvent.getClientY(d));k.connectionHandler.start(g,l.x,l.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(d);mxEvent.consume(d)});k.addCellOverlay(a,b)});k.getModel().beginUpdate();var d;try{d=k.insertVertex(p,null,"Start",
-0,0,80,30,"ellipse"),t(d)}finally{k.getModel().endUpdate()}var g;"horizontalTree"==b?(g=new mxCompactTreeLayout(k),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(g=new mxCompactTreeLayout(k,!1),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(g=new mxRadialTreeLayout(k,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==b?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-b?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==b?(g=new mxFastOrganicLayout(k,!1),g.forceConstant=80):"circle"==b&&(g=new mxCircleLayout(k));if(null!=g){var n=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),g.execute(k.getDefaultParent(),d)}catch(x){throw x;}finally{var l=new mxMorphing(k);l.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));l.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,d,g,c){q.apply(this,arguments);n()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(k.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&f.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();
-var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),b.x,b.y),d=a.editor.graph.view,g=d.getBounds(b);g.x-=d.translate.x;g.y-=d.translate.y;a.editor.graph.scrollRectToVisible(g);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(k.destroy(),c.parentNode.removeChild(c));a.hideDialog()});f.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(u)};this.container=f};
+mxEvent.addListener(d,"click",function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)});h=document.createElement("div");h.style.paddingTop="12px";h.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";h.appendChild(m);f.appendChild(h);this.container=f},CreateGraphDialog=function(a,c,b){var f=document.createElement("div");f.style.textAlign=
+"right";this.init=function(){var c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.width="100%";c.style.height="360px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);f.appendChild(c);var h=new Graph(c);h.setCellsCloneable(!0);h.setPanning(!0);h.setAllowDanglingEdges(!1);h.connectionHandler.select=!1;h.view.setTranslate(20,20);h.border=20;h.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";h.cellRenderer.installCellOverlayListeners=
+function(a,b,d){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(d.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(d){b.fireEvent(new mxEventObject("pointerdown","event",d,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(d.node,"touchstart",function(d){b.fireEvent(new mxEventObject("pointerdown","event",d,"state",a))})};h.getAllConnectionConstraints=function(){return null};h.connectionHandler.marker.highlight.keepOnTop=
+!1;h.connectionHandler.createEdgeState=function(a){a=h.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var t=h.getDefaultParent(),p=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){h.connectionHandler.reset();h.clearSelection();var g=h.getCellGeometry(a),l;n(function(){l=h.insertVertex(t,null,"Entry",g.x,g.y,80,30,"rounded=1;");p(l);h.view.refresh(l);
+h.insertEdge(t,null,"",a,l,m)},function(){h.scrollCellToVisible(l)})});b.addListener("pointerdown",function(a,b){var d=b.getProperty("event"),g=b.getProperty("state");h.popupMenuHandler.hideMenu();h.stopEditing(!1);var l=mxUtils.convertPoint(h.container,mxEvent.getClientX(d),mxEvent.getClientY(d));h.connectionHandler.start(g,l.x,l.y);h.isMouseDown=!0;h.isMouseTrigger=mxEvent.isMouseEvent(d);mxEvent.consume(d)});h.addCellOverlay(a,b)});h.getModel().beginUpdate();var d;try{d=h.insertVertex(t,null,"Start",
+0,0,80,30,"ellipse"),p(d)}finally{h.getModel().endUpdate()}var g;"horizontalTree"==b?(g=new mxCompactTreeLayout(h),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==b?(g=new mxCompactTreeLayout(h,!1),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==b?(g=new mxRadialTreeLayout(h,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==b?g=new mxHierarchicalLayout(h,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+b?g=new mxHierarchicalLayout(h,mxConstants.DIRECTION_WEST):"organic"==b?(g=new mxFastOrganicLayout(h,!1),g.forceConstant=80):"circle"==b&&(g=new mxCircleLayout(h));if(null!=g){var n=function(a,b){h.getModel().beginUpdate();try{null!=a&&a(),g.execute(h.getDefaultParent(),d)}catch(x){throw x;}finally{var l=new mxMorphing(h);l.addListener(mxEvent.DONE,mxUtils.bind(this,function(){h.getModel().endUpdate();null!=b&&b()}));l.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,d,g,c){q.apply(this,arguments);n()};h.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};h.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=c.parentNode&&(h.destroy(),c.parentNode.removeChild(c));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&f.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){h.clearCellOverlays();
+var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),b.x,b.y),d=a.editor.graph.view,g=d.getBounds(b);g.x-=d.translate.x;g.y-=d.translate.y;a.editor.graph.scrollRectToVisible(g);a.editor.graph.setSelectionCells(b);null!=c.parentNode&&(h.destroy(),c.parentNode.removeChild(c));a.hideDialog()});f.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||f.appendChild(u)};this.container=f};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
IMAGE_PATH+"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(a,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var f=document.createElement("h2");mxUtils.write(f,mxResources.get("backgroundImage"));f.style.marginTop="0px";b.appendChild(f);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var f=a.editor.graph.backgroundImage,h=document.createElement("input");h.setAttribute("type","text");h.style.marginTop="4px";h.style.marginBottom="4px";h.style.width="350px";h.value=
-null!=f?f.src:"";var k=!1,m=function(){k||""==h.value||a.isOffline()?(p.value="",t.value=""):a.loadImage(mxUtils.trim(h.value),function(a){p.value=a.width;t.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));h.value="";p.value="";t.value=""})};this.init=function(){h.focus();if(Graph.fileSupport){h.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=b.parentNode,g=null;mxEvent.addListener(d,"dragleave",function(a){null!=
-g&&(g.parentNode.removeChild(g),g=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==g&&(!mxClient.IS_IE||10<document.documentMode)&&(g=a.highlightElement(d));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=g&&(g.parentNode.removeChild(g),g=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,d,g,c,n){h.value=a;m()},function(){},
-function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(h.value=decodeURIComponent(d),m())}b.stopPropagation();b.preventDefault()}),!1)}};b.appendChild(h);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+":");var p=document.createElement("input");
-p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=f?f.width:"";b.appendChild(p);mxUtils.write(b,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="16px";t.value=null!=f?f.height:"";b.appendChild(t);f=mxUtils.button(mxResources.get("reset"),function(){h.value="";p.value="";t.value="";k=!1});mxEvent.addListener(f,"mousedown",
-function(){k=!0});mxEvent.addListener(f,"touchstart",function(){k=!0});f.className="geBtn";f.width="100";b.appendChild(f);mxUtils.br(b);mxEvent.addListener(h,"change",m);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(h.value=a.url,m()));h.focus()};f=document.createElement("div");f.style.marginTop="40px";f.style.textAlign="right";var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+var BackgroundImageDialog=function(a,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var f=document.createElement("h2");mxUtils.write(f,mxResources.get("backgroundImage"));f.style.marginTop="0px";b.appendChild(f);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var f=a.editor.graph.backgroundImage,k=document.createElement("input");k.setAttribute("type","text");k.style.marginTop="4px";k.style.marginBottom="4px";k.style.width="350px";k.value=
+null!=f?f.src:"";var h=!1,m=function(){h||""==k.value||a.isOffline()?(t.value="",p.value=""):a.loadImage(mxUtils.trim(k.value),function(a){t.value=a.width;p.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));k.value="";t.value="";p.value=""})};this.init=function(){k.focus();if(Graph.fileSupport){k.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=b.parentNode,g=null;mxEvent.addListener(d,"dragleave",function(a){null!=
+g&&(g.parentNode.removeChild(g),g=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==g&&(!mxClient.IS_IE||10<document.documentMode)&&(g=a.highlightElement(d));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=g&&(g.parentNode.removeChild(g),g=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,d,g,c,n){k.value=a;m()},function(){},
+function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(k.value=decodeURIComponent(d),m())}b.stopPropagation();b.preventDefault()}),!1)}};b.appendChild(k);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+":");var t=document.createElement("input");
+t.setAttribute("type","text");t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="16px";t.value=null!=f?f.width:"";b.appendChild(t);mxUtils.write(b,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=f?f.height:"";b.appendChild(p);f=mxUtils.button(mxResources.get("reset"),function(){k.value="";t.value="";p.value="";h=!1});mxEvent.addListener(f,"mousedown",
+function(){h=!0});mxEvent.addListener(f,"touchstart",function(){h=!0});f.className="geBtn";f.width="100";b.appendChild(f);mxUtils.br(b);mxEvent.addListener(k,"change",m);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(k.value=a.url,m()));k.focus()};f=document.createElement("div");f.style.marginTop="40px";f.style.textAlign="right";var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
d.className="geBtn";a.editor.cancelFirst&&f.appendChild(d);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var g=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
g.className="geBtn";f.appendChild(g);null!=a.drive&&"1"==urlParams.photos&&(g=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),g.className="geBtn",f.appendChild(g))}g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=h.value?new mxImage(mxUtils.trim(h.value),p.value,t.value):null)});g.className="geBtn gePrimaryBtn";f.appendChild(g);a.editor.cancelFirst||f.appendChild(d);b.appendChild(f);this.container=b},ParseDialog=function(a,c,b){function f(b,d){var g=b.split("\n");if("plantUmlPng"==d||"plantUmlSvg"==
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),g.className="geBtn",f.appendChild(g))}g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=k.value?new mxImage(mxUtils.trim(k.value),t.value,p.value):null)});g.className="geBtn gePrimaryBtn";f.appendChild(g);a.editor.cancelFirst||f.appendChild(d);b.appendChild(f);this.container=b},ParseDialog=function(a,c,b){function f(b,d){var g=b.split("\n");if("plantUmlPng"==d||"plantUmlSvg"==
d||"plantUmlTxt"==d){var g="plantUmlTxt"==d?PLANT_URL+"/txt/":"plantUmlPng"==d?PLANT_URL+"/png/":PLANT_URL+"/svg/",c=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var n=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},l=function(a,b,d){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|d>>6;c4=d&63;r="";r+=n(c1&63);r+=n(c2&63);r+=n(c3&63);return r+=
n(c4&63)},q=new XMLHttpRequest;q.open("GET",g+function(a){r="";for(m=0;m<a.length;m+=3)r=m+2==a.length?r+l(a.charCodeAt(m),a.charCodeAt(m+1),0):m+1==a.length?r+l(a.charCodeAt(m),0,0):r+l(a.charCodeAt(m),a.charCodeAt(m+1),a.charCodeAt(m+2));return r}(c.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=d&&(q.responseType="blob");q.onload=function(g){if(200<=this.status&&300>this.status)if("plantUmlTxt"==d)a.spinner.stop(),c.setSelectionCell(a.insertAsPreText(this.response,
-k.x,k.y)),c.scrollCellToVisible(c.getSelectionCell());else{var l=new FileReader;l.readAsDataURL(this.response);l.onloadend=function(d){var g=new Image;g.onload=function(){a.spinner.stop();var d=g.width,n=g.height;if(0==d&&0==n){var q=l.result,f=q.indexOf(","),q=decodeURIComponent(escape(atob(q.substring(f+1)))),q=mxUtils.parseXml(q).getElementsByTagName("svg");0<q.length&&(d=parseFloat(q[0].getAttribute("width")),n=parseFloat(q[0].getAttribute("height")))}c.getModel().beginUpdate();try{cell=c.insertVertex(null,
-null,b,k.x,k.y,d,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(l.result)+";")}finally{c.getModel().endUpdate()}c.setSelectionCell(cell);c.scrollCellToVisible(c.getSelectionCell())};g.src=l.result};l.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(g)};q.onerror=function(b){a.handleError(b)};q.send()}}else if("table"==d){for(var f=null,u=[],h=0,m=0;m<g.length;m++)if(q=mxUtils.trim(g[m]),"create table"==q.substring(0,12).toLowerCase())q=
-mxUtils.trim(q.substring(12)),"("==q.charAt(q.length-1)&&(q=q.substring(0,q.lastIndexOf(" "))),f=new mxCell(q,new mxGeometry(h,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),f.vertex=!0,u.push(f),q=a.editor.graph.getPreferredSizeForCell(t),null!=q&&(f.geometry.width=q.width+10);else if(null!=f&&")"==q.charAt(0))h+=f.geometry.width+
-40,f=null;else if("("!=q&&null!=f&&(q=q.substring(0,","==q.charAt(q.length-1)?q.length-1:q.length),"primary key"!=q.substring(0,11).toLowerCase())){var p=q.toLowerCase().indexOf("primary key"),q=q.replace(/primary key/i,""),t=new mxCell(q,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");t.vertex=
-!0;q=sb.cloneCell(t,0<p?"PK":"");q.connectable=!1;q.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";q.geometry.width=30;q.geometry.height=26;t.insert(q);q=a.editor.graph.getPreferredSizeForCell(t);null!=q&&f.geometry.width<q.width+10&&(f.geometry.width=Math.min(220,q.width+10));f.insert(t);f.geometry.height+=26}0<u.length&&(c=a.editor.graph,g=c.view,
+h.x,h.y)),c.scrollCellToVisible(c.getSelectionCell());else{var l=new FileReader;l.readAsDataURL(this.response);l.onloadend=function(d){var g=new Image;g.onload=function(){a.spinner.stop();var d=g.width,n=g.height;if(0==d&&0==n){var q=l.result,f=q.indexOf(","),q=decodeURIComponent(escape(atob(q.substring(f+1)))),q=mxUtils.parseXml(q).getElementsByTagName("svg");0<q.length&&(d=parseFloat(q[0].getAttribute("width")),n=parseFloat(q[0].getAttribute("height")))}c.getModel().beginUpdate();try{cell=c.insertVertex(null,
+null,b,h.x,h.y,d,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(l.result)+";")}finally{c.getModel().endUpdate()}c.setSelectionCell(cell);c.scrollCellToVisible(c.getSelectionCell())};g.src=l.result};l.onerror=function(b){a.handleError(b)}}else a.spinner.stop(),a.handleError(g)};q.onerror=function(b){a.handleError(b)};q.send()}}else if("table"==d){for(var f=null,u=[],k=0,m=0;m<g.length;m++)if(q=mxUtils.trim(g[m]),"create table"==q.substring(0,12).toLowerCase())q=
+mxUtils.trim(q.substring(12)),"("==q.charAt(q.length-1)&&(q=q.substring(0,q.lastIndexOf(" "))),f=new mxCell(q,new mxGeometry(k,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),f.vertex=!0,u.push(f),q=a.editor.graph.getPreferredSizeForCell(p),null!=q&&(f.geometry.width=q.width+10);else if(null!=f&&")"==q.charAt(0))k+=f.geometry.width+
+40,f=null;else if("("!=q&&null!=f&&(q=q.substring(0,","==q.charAt(q.length-1)?q.length-1:q.length),"primary key"!=q.substring(0,11).toLowerCase())){var t=q.toLowerCase().indexOf("primary key"),q=q.replace(/primary key/i,""),p=new mxCell(q,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");p.vertex=
+!0;q=sb.cloneCell(p,0<t?"PK":"");q.connectable=!1;q.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";q.geometry.width=30;q.geometry.height=26;p.insert(q);q=a.editor.graph.getPreferredSizeForCell(p);null!=q&&f.geometry.width<q.width+10&&(f.geometry.width=Math.min(220,q.width+10));f.insert(p);f.geometry.height+=26}0<u.length&&(c=a.editor.graph,g=c.view,
q=c.getGraphBounds(),c.setSelectionCells(c.importCells(u,Math.ceil(Math.max(0,q.x/g.scale-g.translate.x)+4*c.gridSize),Math.ceil(Math.max(0,(q.y+q.height)/g.scale-g.translate.y)+4*c.gridSize))),c.scrollCellToVisible(c.getSelectionCell()))}else if("list"==d){if(0<g.length){c=a.editor.graph;f=new mxCell(g[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
-f.vertex=!0;q=c.getPreferredSizeForCell(f);null!=q&&f.geometry.width<q.width+10&&(f.geometry.width=q.width+10);t=[f];if(1<g.length)for(m=1;m<g.length;m++)"--"==g[m]?(q=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),q.vertex=!0,f.geometry.height+=q.geometry.height,f.insert(q),t.push(q)):0<g[m].length&&";"!=g[m].charAt(0)&&(h=new mxCell(g[m],
-new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),h.vertex=!0,q=c.getPreferredSizeForCell(h),null!=q&&h.geometry.width<q.width&&(h.geometry.width=q.width),f.geometry.width=Math.max(f.geometry.width,h.geometry.width),f.geometry.height+=h.geometry.height,f.insert(h),t.push(h));c.getModel().beginUpdate();try{f=c.importCells([f],k.x,k.y)[0],c.fireEvent(new mxEventObject("cellsInserted",
-"cells",[f].concat(f.children)))}finally{c.getModel().endUpdate()}c.setSelectionCell(f);c.scrollCellToVisible(c.getSelectionCell())}}else{for(var t=function(a){var b=F[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,F[a]=b,u.push(b));return b},F={},u=[],m=0;m<g.length;m++)if(";"!=g[m].charAt(0)){var I=g[m].split("->");if(2<=I.length){var p=t(I[0]),A=t(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry);I.edge=!0;p.insertEdge(I,!0);A.insertEdge(I,
-!1);u.push(I)}}if(0<u.length){g=document.createElement("div");g.style.visibility="hidden";document.body.appendChild(g);c=new Graph(g);c.getModel().beginUpdate();try{u=c.importCells(u);for(m=0;m<u.length;m++)c.getModel().isVertex(u[m])&&(q=c.getPreferredSizeForCell(u[m]),u[m].geometry.width=Math.max(u[m].geometry.width,q.width),u[m].geometry.height=Math.max(u[m].geometry.height,q.height));f=new mxFastOrganicLayout(c);f.disableEdgeStyle=!1;f.forceConstant=120;f.execute(c.getDefaultParent());h=new mxParallelEdgeLayout(c);
-h.spacing=20;h.execute(c.getDefaultParent())}finally{c.getModel().endUpdate()}c.clearCellOverlays();t=[];a.editor.graph.getModel().beginUpdate();try{t=a.editor.graph.importCells(c.getModel().getChildren(c.getDefaultParent()),k.x,k.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",t))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(t);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());c.destroy();g.parentNode.removeChild(g)}}}function h(){return"list"==
-p.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"table"==p.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==p.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
-"plantUmlSvg"==p.value||"plantUmlTxt"==p.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var k=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height=
-"354px";m.style.marginBottom="16px";var p=document.createElement("select");"formatSql"==b&&(p.style.display="none");var t=document.createElement("option");t.setAttribute("value","list");mxUtils.write(t,mxResources.get("list"));"plantUml"!=b&&p.appendChild(t);null!=b&&"fromText"!=b||t.setAttribute("selected","selected");t=document.createElement("option");t.setAttribute("value","table");mxUtils.write(t,mxResources.get("formatSql"));"formatSql"==b&&(p.appendChild(t),t.setAttribute("selected","selected"));
-t=document.createElement("option");t.setAttribute("value","diagram");mxUtils.write(t,mxResources.get("diagram"));"plantUml"!=b&&p.appendChild(t);t=document.createElement("option");t.setAttribute("value","plantUmlSvg");mxUtils.write(t,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&t.setAttribute("selected","selected");var d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
-")");var g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(p.appendChild(t),p.appendChild(d),p.appendChild(g));var n=h();m.value=n;c.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),m.addEventListener("drop",function(a){a.stopPropagation();
-a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){m.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(p);mxEvent.addListener(p,"change",function(){var a=h();if(0==m.value.length||m.value==n)n=a,m.value=n});b=mxUtils.button(mxResources.get("close"),function(){m.value==n?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);t=mxUtils.button(mxResources.get("insert"),
-function(){a.hideDialog();f(m.value,p.value)});c.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,f,h,k,m,p,t,d,g,n,q,u,v,w){function y(){var a=!0;if(null!=S)for(;F<S.length&&(a||0!=mxUtils.mod(F,30));)a=S[F++],z(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function l(){if(Z)b||a.hideDialog(),u(Z,aa,D.value);else if(f)b||a.hideDialog(),f(V,D.value);else{var d=D.value;
-null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,V,null!=R&&0<R.length?R:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function x(a,b,d,g,l){null!=Y&&(Y.style.backgroundColor="transparent",Y.style.border="1px solid transparent");A.removeAttribute("disabled");V=b;R=d;Y=a;Z=g;aa=l;Y.style.backgroundColor=p;Y.style.border=t}function z(b,d,g,c,n,q,f,u,z){var w=document.createElement("div");w.className="geTemplate";
+f.vertex=!0;q=c.getPreferredSizeForCell(f);null!=q&&f.geometry.width<q.width+10&&(f.geometry.width=q.width+10);p=[f];if(1<g.length)for(m=1;m<g.length;m++)"--"==g[m]?(q=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),q.vertex=!0,f.geometry.height+=q.geometry.height,f.insert(q),p.push(q)):0<g[m].length&&";"!=g[m].charAt(0)&&(k=new mxCell(g[m],
+new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),k.vertex=!0,q=c.getPreferredSizeForCell(k),null!=q&&k.geometry.width<q.width&&(k.geometry.width=q.width),f.geometry.width=Math.max(f.geometry.width,k.geometry.width),f.geometry.height+=k.geometry.height,f.insert(k),p.push(k));c.getModel().beginUpdate();try{f=c.importCells([f],h.x,h.y)[0],c.fireEvent(new mxEventObject("cellsInserted",
+"cells",[f].concat(f.children)))}finally{c.getModel().endUpdate()}c.setSelectionCell(f);c.scrollCellToVisible(c.getSelectionCell())}}else{for(var p=function(a){var b=F[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,F[a]=b,u.push(b));return b},F={},u=[],m=0;m<g.length;m++)if(";"!=g[m].charAt(0)){var I=g[m].split("->");if(2<=I.length){var t=p(I[0]),A=p(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry);I.edge=!0;t.insertEdge(I,!0);A.insertEdge(I,
+!1);u.push(I)}}if(0<u.length){g=document.createElement("div");g.style.visibility="hidden";document.body.appendChild(g);c=new Graph(g);c.getModel().beginUpdate();try{u=c.importCells(u);for(m=0;m<u.length;m++)c.getModel().isVertex(u[m])&&(q=c.getPreferredSizeForCell(u[m]),u[m].geometry.width=Math.max(u[m].geometry.width,q.width),u[m].geometry.height=Math.max(u[m].geometry.height,q.height));f=new mxFastOrganicLayout(c);f.disableEdgeStyle=!1;f.forceConstant=120;f.execute(c.getDefaultParent());k=new mxParallelEdgeLayout(c);
+k.spacing=20;k.execute(c.getDefaultParent())}finally{c.getModel().endUpdate()}c.clearCellOverlays();p=[];a.editor.graph.getModel().beginUpdate();try{p=a.editor.graph.importCells(c.getModel().getChildren(c.getDefaultParent()),h.x,h.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",p))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(p);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());c.destroy();g.parentNode.removeChild(g)}}}function k(){return"list"==
+t.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"table"==t.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==t.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
+"plantUmlSvg"==t.value||"plantUmlTxt"==t.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var h=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height=
+"354px";m.style.marginBottom="16px";var t=document.createElement("select");"formatSql"==b&&(t.style.display="none");var p=document.createElement("option");p.setAttribute("value","list");mxUtils.write(p,mxResources.get("list"));"plantUml"!=b&&t.appendChild(p);null!=b&&"fromText"!=b||p.setAttribute("selected","selected");p=document.createElement("option");p.setAttribute("value","table");mxUtils.write(p,mxResources.get("formatSql"));"formatSql"==b&&(t.appendChild(p),p.setAttribute("selected","selected"));
+p=document.createElement("option");p.setAttribute("value","diagram");mxUtils.write(p,mxResources.get("diagram"));"plantUml"!=b&&t.appendChild(p);p=document.createElement("option");p.setAttribute("value","plantUmlSvg");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&p.setAttribute("selected","selected");var d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
+")");var g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(t.appendChild(p),t.appendChild(d),t.appendChild(g));var n=k();m.value=n;c.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),m.addEventListener("drop",function(a){a.stopPropagation();
+a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){m.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(t);mxEvent.addListener(t,"change",function(){var a=k();if(0==m.value.length||m.value==n)n=a,m.value=n});b=mxUtils.button(mxResources.get("close"),function(){m.value==n?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);p=mxUtils.button(mxResources.get("insert"),
+function(){a.hideDialog();f(m.value,t.value)});c.appendChild(p);p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,f,k,h,m,t,p,d,g,n,q,u,v,w){function y(){var a=!0;if(null!=S)for(;F<S.length&&(a||0!=mxUtils.mod(F,30));)a=S[F++],z(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function l(){if(Z)b||a.hideDialog(),u(Z,aa,D.value);else if(f)b||a.hideDialog(),f(V,D.value);else{var d=D.value;
+null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,V,null!=R&&0<R.length?R:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function x(a,b,d,g,c){null!=Y&&(Y.style.backgroundColor="transparent",Y.style.border="1px solid transparent");A.removeAttribute("disabled");V=b;R=d;Y=a;Z=g;aa=c;Y.style.backgroundColor=t;Y.style.border=p}function z(b,d,g,c,n,q,f,u,z){var w=document.createElement("div");w.className="geTemplate";
w.style.height=N+"px";w.style.width=X+"px";null!=c&&0<c.length&&w.setAttribute("title",c);if(null!=q)w.style.backgroundImage="url("+q+")",w.style.backgroundSize="contain",w.style.backgroundPosition="center center",w.style.backgroundRepeat="no-repeat",mxEvent.addListener(w,"click",function(a){x(w,null,null,b,f)}),mxEvent.addListener(w,"dblclick",function(a){l()});else if(null!=b&&0<b.length){g=z||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";w.style.backgroundImage="url("+g+")";w.style.backgroundPosition=
"center center";w.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(w,"click",function(g){A.setAttribute("disabled","disabled");w.style.backgroundColor="transparent";w.style.border="1px solid transparent";g=b;g=/^https?:\/\//.test(g)&&!a.isCorsEnabledForUrl(g)?PROXY_URL+"?url="+encodeURIComponent(g):TEMPLATE_PATH+"/"+g;I.spin(O);mxUtils.get(g,mxUtils.bind(this,function(a){I.stop();200<=a.getStatus()&&299>=a.getStatus()&&(x(w,a.getText(),d),v&&l())}))});mxEvent.addListener(w,"dblclick",
function(a){v=!0})}else w.innerHTML='<table width="100%" height="100%" style="line-height:1em;"><tr><td align="center" valign="middle">'+mxResources.get(g)+"</td></tr></table>",n&&x(w),null!=u?mxEvent.addListener(w,"click",u):(mxEvent.addListener(w,"click",function(a){x(w)}),mxEvent.addListener(w,"dblclick",function(a){l()}));O.appendChild(w)}function E(){mxEvent.addListener(O,"scroll",function(a){O.scrollTop+O.clientHeight>=O.scrollHeight&&(y(),mxEvent.consume(a))});var a=null,b;for(b in P){var g=
-document.createElement("div"),l=mxResources.get(b),c=P[b];null==l&&(l=b.substring(0,1).toUpperCase()+b.substring(1));18<l.length&&(l=l.substring(0,18)+"&hellip;");g.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";g.setAttribute("title",l+" ("+c.length+")");mxUtils.write(g,g.getAttribute("title"));null!=d&&(g.style.padding=d);Q.appendChild(g);null==a&&(a=g,a.style.backgroundColor=m);(function(b,d){mxEvent.addListener(g,
-"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=m,O.scrollTop=0,O.innerHTML="",F=0,S=P[b],J=null,y())})})(b,g)}y()}b=null!=b?b:!0;h=null!=h?h:!1;m=null!=m?m:"#ebf2f9";p=null!=p?p:"#e6eff8";t=null!=t?t:"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var C=document.createElement("div");C.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";b&&C.appendChild(B);var H=document.createElement("img");H.setAttribute("border",
+document.createElement("div"),c=mxResources.get(b),l=P[b];null==c&&(c=b.substring(0,1).toUpperCase()+b.substring(1));18<c.length&&(c=c.substring(0,18)+"&hellip;");g.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";g.setAttribute("title",c+" ("+l.length+")");mxUtils.write(g,g.getAttribute("title"));null!=d&&(g.style.padding=d);Q.appendChild(g);null==a&&(a=g,a.style.backgroundColor=m);(function(b,d){mxEvent.addListener(g,
+"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=m,O.scrollTop=0,O.innerHTML="",F=0,S=P[b],J=null,y())})})(b,g)}y()}b=null!=b?b:!0;k=null!=k?k:!1;m=null!=m?m:"#ebf2f9";t=null!=t?t:"#e6eff8";p=null!=p?p:"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var C=document.createElement("div");C.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";b&&C.appendChild(B);var H=document.createElement("img");H.setAttribute("border",
"0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
!c&&b&&B.appendChild(H);b&&mxUtils.write(B,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?H=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?H=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?H=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?H=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(H=a.trello.extension);var D=
document.createElement("input");D.setAttribute("value",a.defaultFilename+H);D.style.marginRight="20px";D.style.marginLeft="10px";D.style.width=c?"220px":"430px";this.init=function(){b&&(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?D.select():document.execCommand("selectAll",!1,null))};b&&B.appendChild(D);var B=!1,F=0,I=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),A=mxUtils.button(w||
@@ -7565,185 +7586,188 @@ mxResources.get("create"),function(){A.setAttribute("disabled","disabled");l();A
if(q){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxResources.get("search")+":";w.appendChild(H);var T=document.createElement("input");T.style.marginRight="10px";T.style.marginLeft="10px";T.style.width="220px";mxEvent.addListener(T,"keypress",function(a){13==a.keyCode&&L(!0)});w.appendChild(T);H=mxUtils.button(mxResources.get("search"),function(){L(!0)});H.className="geBtn";w.appendChild(H)}M(0)}var R=null,V=null,Y=null,Z=null,aa=null,O=document.createElement("div");O.style.border=
"1px solid #d3d3d3";O.style.position="absolute";O.style.left="160px";O.style.right="34px";B=(b?72:40)+(B?30:0);O.style.top=B+"px";O.style.bottom="68px";O.style.margin="6px 0 0 -1px";O.style.padding="6px";O.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+B+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var N=140,X=140,P={},U=1;P.basic=[{title:"blankDiagram",select:!0}];var S=P.basic;if(!c){C.appendChild(Q);
C.appendChild(O);var ba=!1;/^https?:\/\//.test(g)&&!a.isCorsEnabledForUrl(g)&&(g=PROXY_URL+"?url="+encodeURIComponent(g));mxUtils.get(g,function(a){if(!ba){ba=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=a.getAttribute("section");null==d&&(d=b.indexOf("/"),d=b.substring(0,d));b=P[d];null==b&&(U++,b=[],P[d]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),
-tooltip:a.getAttribute("url"),preview:a.getAttribute("preview")})}}a=a.nextSibling}E()}})}mxEvent.addListener(D,"keypress",function(b){a.dialog.container.firstChild==C&&13==b.keyCode&&l()});g=document.createElement("div");g.style.marginTop=c?"4px":"16px";g.style.textAlign="right";g.style.position="absolute";g.style.left="40px";g.style.bottom="24px";g.style.right="40px";B=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});B.className="geBtn";!a.editor.cancelFirst||
-h&&null==k||g.appendChild(B);c||a.isOffline()||!b||null!=f||h||(w=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),w.className="geBtn",g.appendChild(w));c||"1"==urlParams.embed||h||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(D.value)+
+tooltip:a.getAttribute("url"),preview:a.getAttribute("preview")})}}a=a.nextSibling}E()}})}mxEvent.addListener(D,"keypress",function(b){a.dialog.container.firstChild==C&&13==b.keyCode&&l()});g=document.createElement("div");g.style.marginTop=c?"4px":"16px";g.style.textAlign="right";g.style.position="absolute";g.style.left="40px";g.style.bottom="24px";g.style.right="40px";B=mxUtils.button(mxResources.get("cancel"),function(){null!=h&&h();a.hideDialog(!0)});B.className="geBtn";!a.editor.cancelFirst||
+k&&null==h||g.appendChild(B);c||a.isOffline()||!b||null!=f||k||(w=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),w.className="geBtn",g.appendChild(w));c||"1"==urlParams.embed||k||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(D.value)+
"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",g.appendChild(c));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(d){a.openFiles(b.files,!0)});b.click()}),v.className="geBtn",
-g.appendChild(v));g.appendChild(A);a.editor.cancelFirst||null!=f||h&&null==k||g.appendChild(B);C.appendChild(g);this.container=C},CreateDialog=function(a,c,b,f,h,k,m,p,t,d,g,n,q,u,v){function w(b,d,g,l){function q(){mxEvent.addListener(f,"click",function(){var b=g;if(m){var d=x.value,l=d.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:C.value,n="";b==App.MODE_GOOGLE?n=a.drive.extension:b==App.MODE_GITHUB?n=a.gitHub.extension:b==App.MODE_TRELLO?n=a.trello.extension:b==App.MODE_DROPBOX?
+g.appendChild(v));g.appendChild(A);a.editor.cancelFirst||null!=f||k&&null==h||g.appendChild(B);C.appendChild(g);this.container=C},CreateDialog=function(a,c,b,f,k,h,m,t,p,d,g,n,q,u,v){function w(b,d,g,l){function q(){mxEvent.addListener(f,"click",function(){var b=g;if(m){var d=x.value,l=d.lastIndexOf(".");if(0>c.lastIndexOf(".")&&0>l){var b=null!=b?b:C.value,n="";b==App.MODE_GOOGLE?n=a.drive.extension:b==App.MODE_GITHUB?n=a.gitHub.extension:b==App.MODE_TRELLO?n=a.trello.extension:b==App.MODE_DROPBOX?
n=a.dropbox.extension:b==App.MODE_ONEDRIVE?n=a.oneDrive.extension:b==App.MODE_DEVICE&&(n=".xml");0<=l&&(d=d.substring(0,l));x.value=d+n}}y(g)})}var f=document.createElement("a");f.style.overflow="hidden";var u=document.createElement("img");u.src=b;u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin=
"4px";f.style.padding="8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(u);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var w=document.createElement("div");f.appendChild(w);mxUtils.write(w,d);if(null!=l&&null==a[l]){u.style.visibility="hidden";mxUtils.setOpacity(w,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(f);var h=window.setTimeout(function(){null==
-a[l]&&(v.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(h),mxUtils.setOpacity(w,100),u.style.visibility="",v.stop(),q())}))}else q();z.appendChild(f);++E==n&&(mxUtils.br(z),E=0)}function y(d){var g=x.value;if(null==d||null!=g&&0<g.length)a.hideDialog(),b(g,d)}m=null!=m?m:!0;p=null!=p?p:!0;n=null!=n?n:4;k=document.createElement("div");null==f&&a.addLanguageMenu(k);var l=document.createElement("h2");mxUtils.write(l,h||
-mxResources.get("create"));l.style.marginTop="0px";l.style.marginBottom="24px";k.appendChild(l);mxUtils.write(k,mxResources.get("filename")+":");var x=document.createElement("input");x.setAttribute("value",c);x.style.width="280px";x.style.marginLeft="10px";x.style.marginBottom="20px";this.init=function(){x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};k.appendChild(x);null!=q&&null!=u&&"image/"==u.substring(0,
-6)&&(x.style.width="160px",h=null,"image/svg+xml"==u&&mxClient.IS_SVG?(h=document.createElement("div"),h.innerHTML=mxUtils.trim(q),q=h.getElementsByTagName("svg")[0],u=parseInt(q.getAttribute("width")),v=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+u+" "+v),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(h=document.createElement("img"),h.setAttribute("src","data:"+u+(v?";base64,":";utf8,")+q)),h.style.position="absolute",h.style.top="70px",h.style.right="100px",
-h.style.maxWidth="120px",h.style.maxHeight="80px",mxUtils.setPrefixedStyle(h.style,"transform","translate(50%,-50%)"),k.appendChild(h),t&&Editor.popupsAllowed&&(h.style.cursor="pointer",mxEvent.addListener(h,"click",function(){y("_blank")})));mxUtils.br(k);var z=document.createElement("div");z.style.textAlign="center";var E=0;z.style.marginTop="6px";k.appendChild(z);var C=document.createElement("select");C.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&
+a[l]&&(v.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[l]&&(window.clearTimeout(h),mxUtils.setOpacity(w,100),u.style.visibility="",v.stop(),q())}))}else q();z.appendChild(f);++E==n&&(mxUtils.br(z),E=0)}function y(d){var g=x.value;if(null==d||null!=g&&0<g.length)a.hideDialog(),b(g,d)}m=null!=m?m:!0;t=null!=t?t:!0;n=null!=n?n:4;h=document.createElement("div");null==f&&a.addLanguageMenu(h);var l=document.createElement("h2");mxUtils.write(l,k||
+mxResources.get("create"));l.style.marginTop="0px";l.style.marginBottom="24px";h.appendChild(l);mxUtils.write(h,mxResources.get("filename")+":");var x=document.createElement("input");x.setAttribute("value",c);x.style.width="280px";x.style.marginLeft="10px";x.style.marginBottom="20px";this.init=function(){x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};h.appendChild(x);null!=q&&null!=u&&"image/"==u.substring(0,
+6)&&(x.style.width="160px",k=null,"image/svg+xml"==u&&mxClient.IS_SVG?(k=document.createElement("div"),k.innerHTML=mxUtils.trim(q),q=k.getElementsByTagName("svg")[0],u=parseInt(q.getAttribute("width")),v=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+u+" "+v),q.setAttribute("width","120px"),q.setAttribute("height","80px")):(k=document.createElement("img"),k.setAttribute("src","data:"+u+(v?";base64,":";utf8,")+q)),k.style.position="absolute",k.style.top="70px",k.style.right="100px",
+k.style.maxWidth="120px",k.style.maxHeight="80px",mxUtils.setPrefixedStyle(k.style,"transform","translate(50%,-50%)"),h.appendChild(k),p&&Editor.popupsAllowed&&(k.style.cursor="pointer",mxEvent.addListener(k,"click",function(){y("_blank")})));mxUtils.br(h);var z=document.createElement("div");z.style.textAlign="center";var E=0;z.style.marginTop="6px";h.appendChild(z);var C=document.createElement("select");C.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&
(q=document.createElement("option"),q.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),C.appendChild(q),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),C.appendChild(q),a.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",
mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),C.appendChild(q),a.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),
C.appendChild(q),w(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),C.appendChild(q),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,
-mxResources.get("device")),C.appendChild(q),a.mode!=App.MODE_DEVICE&&p||q.setAttribute("selected","selected"),g&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));p&&isLocalStorage&&"0"!=urlParams.browser&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_BROWSER),mxUtils.write(p,mxResources.get("browser")),C.appendChild(p),a.mode==App.MODE_BROWSER&&p.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),
-App.MODE_BROWSER));p=document.createElement("div");p.style.marginTop="26px";p.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(d)}),g.className="geBtn",p.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=f?f():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&p.appendChild(g);null==f&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),
-q.className="geBtn",p.appendChild(q));t&&Editor.popupsAllowed&&(t=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),t.className="geBtn",p.appendChild(t));a.editor.cancelFirst||p.appendChild(g);mxEvent.addListener(x,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});k.appendChild(p);this.container=k},PopupDialog=function(a,c,b,f,h){h=null!=h?h:!0;var k=document.createElement("div");k.style.textAlign="left";
-mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){h&&a.hideDialog();null!=f&&f()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";k.appendChild(m);mxUtils.br(k);var p=mxUtils.button(mxResources.get("openInNewWindow"),function(){h&&a.hideDialog();null!=b&&b();a.openLink(c,null,!0)});p.className="geBtn gePrimaryBtn";p.style.width=m.style.width;k.appendChild(p);mxUtils.br(k);mxUtils.br(k);
-mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,c,b,f,h,k){k=null!=k?k:!0;var m=a.editor.graph,p=document.createElement("div");mxUtils.write(p,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var t=document.createElement("input");t.setAttribute("value",
-b);t.setAttribute("type","text");t.setAttribute("spellcheck","false");t.setAttribute("autocorrect","off");t.setAttribute("autocomplete","off");t.setAttribute("autocapitalize","off");t.style.marginTop="6px";t.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";t.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";t.style.backgroundRepeat="no-repeat";t.style.backgroundPosition="100% 50%";t.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",
-mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display=mxClient.IS_VML?"inline":"inline-block";b.style.top=(mxClient.IS_VML?0:3)+"px";b.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(b,"click",function(){t.value="";t.focus()});c.appendChild(t);c.appendChild(b);p.appendChild(c);var d=function(b,d,g,c){var l="data:"==b.substring(0,5);!a.isOffline()||l&&"undefined"===typeof chrome?
-0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(l){a.spinner.stop();a.hideDialog();var n=!1===c?1:null!=d&&null!=g?Math.max(d/l.width,g/l.height):Math.min(1,Math.min(520/l.width,520/l.height));k&&(b=a.convertDataUri(b));f(b,Math.round(Number(l.width)*n),Math.round(Number(l.height)*n))},function(){a.spinner.stop();f(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),f(b)):(b=a.convertDataUri(b),
-d=null==d?120:d,g=null==g?100:g,a.hideDialog(),f(b,d,g))},g=function(b,g){if(null!=b){var c=h?null:m.getModel().getGeometry(m.getSelectionCell());null!=c?d(b,c.width,c.height,g):d(b,null,null,g)}else a.hideDialog(),f(null)};this.init=function(){t.focus();if(Graph.fileSupport){t.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=p.parentNode,d=null;mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,
+mxResources.get("device")),C.appendChild(q),a.mode!=App.MODE_DEVICE&&t||q.setAttribute("selected","selected"),g&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));t&&isLocalStorage&&"0"!=urlParams.browser&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_BROWSER),mxUtils.write(t,mxResources.get("browser")),C.appendChild(t),a.mode==App.MODE_BROWSER&&t.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),
+App.MODE_BROWSER));t=document.createElement("div");t.style.marginTop="26px";t.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){a.openLink(d)}),g.className="geBtn",t.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=f?f():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});g.className="geBtn";a.editor.cancelFirst&&t.appendChild(g);null==f&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),
+q.className="geBtn",t.appendChild(q));p&&Editor.popupsAllowed&&(p=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),p.className="geBtn",t.appendChild(p));a.editor.cancelFirst||t.appendChild(g);mxEvent.addListener(x,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});h.appendChild(t);this.container=h},PopupDialog=function(a,c,b,f,k){k=null!=k?k:!0;var h=document.createElement("div");h.style.textAlign="left";
+mxUtils.write(h,mxResources.get("fileOpenLocation"));mxUtils.br(h);mxUtils.br(h);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){k&&a.hideDialog();null!=f&&f()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";h.appendChild(m);mxUtils.br(h);var t=mxUtils.button(mxResources.get("openInNewWindow"),function(){k&&a.hideDialog();null!=b&&b();a.openLink(c,null,!0)});t.className="geBtn gePrimaryBtn";t.style.width=m.style.width;h.appendChild(t);mxUtils.br(h);mxUtils.br(h);
+mxUtils.write(h,mxResources.get("allowPopups"));this.container=h},ImageDialog=function(a,c,b,f,k,h){h=null!=h?h:!0;var m=a.editor.graph,t=document.createElement("div");mxUtils.write(t,c);c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow="clip";c.style.cursor="default";mxClient.IS_VML||(c.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("value",
+b);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",
+mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display=mxClient.IS_VML?"inline":"inline-block";b.style.top=(mxClient.IS_VML?0:3)+"px";b.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(b,"click",function(){p.value="";p.focus()});c.appendChild(p);c.appendChild(b);t.appendChild(c);var d=function(b,d,g,c){var l="data:"==b.substring(0,5);!a.isOffline()||l&&"undefined"===typeof chrome?
+0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(l){a.spinner.stop();a.hideDialog();var n=!1===c?1:null!=d&&null!=g?Math.max(d/l.width,g/l.height):Math.min(1,Math.min(520/l.width,520/l.height));h&&(b=a.convertDataUri(b));f(b,Math.round(Number(l.width)*n),Math.round(Number(l.height)*n))},function(){a.spinner.stop();f(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),f(b)):(b=a.convertDataUri(b),
+d=null==d?120:d,g=null==g?100:g,a.hideDialog(),f(b,d,g))},g=function(b,g){if(null!=b){var c=k?null:m.getModel().getGeometry(m.getSelectionCell());null!=c?d(b,c.width,c.height,g):d(b,null,null,g)}else a.hideDialog(),f(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=t.parentNode,d=null;mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,
"dragover",mxUtils.bind(this,function(g){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=a.highlightElement(b));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,d,c,n,q,f,u){g(a,u)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));
else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(c)&&g(decodeURIComponent(c))}b.stopPropagation();b.preventDefault()}),!1)}};b=document.createElement("div");b.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";b.style.textAlign="right";c=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);ImageDialog.filePicked=
-function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(t.value=a.url));t.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(a,b,d,l,c,n){g(a)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){n.click()});q.className="geBtn";b.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==t.value.substring(0,11)&&"data:image/svg"!=t.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,t.value,function(a){t.value=a});a.showDialog(b.container,200,185,!0,!0);b.init()}),q.className="geBtn",b.appendChild(q));"undefined"!=
+function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(p.value=a.url));p.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(a,b,d,c,n,q){g(a)},function(){},function(a){return"image/"==a.type.substring(0,
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){n.click()});q.className="geBtn";b.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==p.value.substring(0,11)&&"data:image/svg"!=p.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,p.value,function(a){p.value=a});a.showDialog(b.container,200,185,!0,!0);b.init()}),q.className="geBtn",b.appendChild(q));"undefined"!=
typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(q=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),q.className="geBtn",b.appendChild(q),null!=a.drive&&"1"==urlParams.photos&&
(q=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),
-q.className="geBtn",b.appendChild(q)));mxEvent.addListener(t,"keypress",function(a){13==a.keyCode&&g(t.value)});q=mxUtils.button(mxResources.get("apply"),function(){g(t.value)});q.className="geBtn gePrimaryBtn";b.appendChild(q);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.backgroundPosition="center 65%",p.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position=
-"absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),p.appendChild(c));p.appendChild(b);this.container=p},LinkDialog=function(a,c,b,f,h){function k(a,b,d){d=mxUtils.button("",d);d.className="geBtn";d.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";b.style.width="26px";b.setAttribute("src",a);d.style.minWidth="42px";d.style.verticalAlign="middle";
-d.appendChild(b);y.appendChild(d)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var p=document.createElement("div");p.className="geTitle";p.style.backgroundColor="transparent";p.style.borderColor="transparent";p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";mxClient.IS_VML||(p.style.paddingRight="20px");var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("dragUrlsHere"));t.setAttribute("type","text");
-t.style.marginTop="6px";t.style.width="440px";t.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";t.style.backgroundRepeat="no-repeat";t.style.backgroundPosition="100% 50%";t.style.paddingRight="14px";var d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?
-0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){t.value="";t.focus()});var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name",
-"current-linkdialog");var q=document.createElement("select");q.style.width="420px";if(h&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(t.setAttribute("value",c),g.setAttribute("checked","checked"),g.defaultChecked=!0);t.style.width="420px";p.appendChild(g);p.appendChild(t);p.appendChild(d);mxUtils.br(p);p.appendChild(n);h=!1;for(d=0;d<a.pages.length;d++){var u=document.createElement("option");mxUtils.write(u,a.pages[d].getName()||
-mxResources.get("pageWithNumber",[d+1]));u.setAttribute("value","data:page/id,"+a.pages[d].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),h=!0);q.appendChild(u)}if(!h&&n.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");q.appendChild(v);mxEvent.addListener(q,"change",function(){null==v.parentNode||v.selected||
-v.parentNode.removeChild(v)})}p.appendChild(q)}else t.setAttribute("value",c),p.appendChild(t),p.appendChild(d);m.appendChild(p);var w=mxUtils.button(b,function(){a.hideDialog();f(n.checked?"pageNotFound"!==q.value?q.value:c:t.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){n.checked?q.focus():(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null));
-mxEvent.addListener(q,"focus",function(){g.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(t,"focus",function(){n.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var b=m.parentNode,d=null;mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(g){null==d&&(!mxClient.IS_IE||
-10<document.documentMode)&&(d=a.highlightElement(b));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(t.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign=
-"right";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&y.appendChild(b);p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});p.style.verticalAlign="middle";p.className="geBtn";y.appendChild(p);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=
-a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);t.value=b;t.focus()}else LinkDialog.selectedDocs=null;t.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),
+q.className="geBtn",b.appendChild(q)));mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&g(p.value)});q=mxUtils.button(mxResources.get("apply"),function(){g(p.value)});q.className="geBtn gePrimaryBtn";b.appendChild(q);a.editor.cancelFirst||b.appendChild(c);Graph.fileSupport&&(b.style.marginTop="120px",t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.backgroundPosition="center 65%",t.style.backgroundRepeat="no-repeat",c=document.createElement("div"),c.style.position=
+"absolute",c.style.width="420px",c.style.top="58%",c.style.textAlign="center",c.style.fontSize="18px",c.style.color="#a0c3ff",mxUtils.write(c,mxResources.get("dragImagesHere")),t.appendChild(c));t.appendChild(b);this.container=t},LinkDialog=function(a,c,b,f,k){function h(a,b,d){d=mxUtils.button("",d);d.className="geBtn";d.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";b.style.width="26px";b.setAttribute("src",a);d.style.minWidth="42px";d.style.verticalAlign="middle";
+d.appendChild(b);y.appendChild(d)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var t=document.createElement("div");t.className="geTitle";t.style.backgroundColor="transparent";t.style.borderColor="transparent";t.style.whiteSpace="nowrap";t.style.textOverflow="clip";t.style.cursor="default";mxClient.IS_VML||(t.style.paddingRight="20px");var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("dragUrlsHere"));p.setAttribute("type","text");
+p.style.marginTop="6px";p.style.width="440px";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";var d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?
+0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){p.value="";p.focus()});var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name",
+"current-linkdialog");var q=document.createElement("select");q.style.width="420px";if(k&&null!=a.pages){null!=c&&"data:page/id,"==c.substring(0,13)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(p.setAttribute("value",c),g.setAttribute("checked","checked"),g.defaultChecked=!0);p.style.width="420px";t.appendChild(g);t.appendChild(p);t.appendChild(d);mxUtils.br(t);t.appendChild(n);k=!1;for(d=0;d<a.pages.length;d++){var u=document.createElement("option");mxUtils.write(u,a.pages[d].getName()||
+mxResources.get("pageWithNumber",[d+1]));u.setAttribute("value","data:page/id,"+a.pages[d].getId());c==u.getAttribute("value")&&(u.setAttribute("selected","selected"),k=!0);q.appendChild(u)}if(!k&&n.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");q.appendChild(v);mxEvent.addListener(q,"change",function(){null==v.parentNode||v.selected||
+v.parentNode.removeChild(v)})}t.appendChild(q)}else p.setAttribute("value",c),t.appendChild(p),t.appendChild(d);m.appendChild(t);var w=mxUtils.button(b,function(){a.hideDialog();f(n.checked?"pageNotFound"!==q.value?q.value:c:p.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){n.checked?q.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null));
+mxEvent.addListener(q,"focus",function(){g.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(p,"focus",function(){n.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var b=m.parentNode,d=null;mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(g){null==d&&(!mxClient.IS_IE||
+10<document.documentMode)&&(d=a.highlightElement(b));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign=
+"right";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.style.verticalAlign="middle";b.className="geBtn";a.editor.cancelFirst&&y.appendChild(b);t=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});t.style.verticalAlign="middle";t.className="geBtn";y.appendChild(t);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(t.style.display="none");LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=
+a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);p.value=b;p.focus()}else LinkDialog.selectedDocs=null;p.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&h(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),
function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(d).addView(g).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){t.value=a[0].link;t.focus()}})});null!=a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){t.value=b.value[0].webUrl;
-t.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],d=a[1],g=a[2];a=a.slice(3,a.length).join("/");t.value="https://github.com/"+b+"/"+d+"/blob/"+g+"/"+a;t.focus()}})});mxEvent.addListener(t,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),f(n.checked?q.value:t.value,LinkDialog.selectedDocs))});y.appendChild(w);a.editor.cancelFirst||y.appendChild(b);m.appendChild(y);this.container=
+a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&h(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){p.value=a[0].link;p.focus()}})});null!=a.oneDrive&&h(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){p.value=b.value[0].webUrl;
+p.focus()})});null!=a.gitHub&&h(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],d=a[1],g=a[2];a=a.slice(3,a.length).join("/");p.value="https://github.com/"+b+"/"+d+"/blob/"+g+"/"+a;p.focus()}})});mxEvent.addListener(p,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),f(n.checked?q.value:p.value,LinkDialog.selectedDocs))});y.appendChild(w);a.editor.cancelFirst||y.appendChild(b);m.appendChild(y);this.container=
m},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var b=document.createElement("img");b.style.border="0px";mxClient.IS_SVG?(b.setAttribute("width","164"),b.setAttribute("height","221"),b.style.width="164px",b.style.height="221px",b.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(b.setAttribute("width","176"),b.setAttribute("height","219"),b.style.width="170px",b.style.height="219px",b.setAttribute("src",IMAGE_PATH+
"/logo-flat.png"));"dark"==uiTheme&&(b.style.filter="grayscale(100%) invert(100%)");c.appendChild(b);mxUtils.br(c);var b="dark"==uiTheme?"#cccccc":"#505050",f=document.createElement("small");f.innerHTML="v "+EditorUi.VERSION;f.style.color=b;c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=document.createElement("small");f.style.color=b;f.innerHTML='&copy; 2005-2019 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(f);mxEvent.addListener(c,
"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),b=document.createElement("div");mxUtils.write(b,mxResources.get("sendYourFeedbackToDrawIo"));b.style.fontSize="18px";b.style.marginBottom="18px";c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(b);var f=document.createElement("input");f.setAttribute("type",
-"text");f.style.marginTop="6px";f.style.width="600px";var h=mxUtils.button(mxResources.get("sendMessage"),function(){var b=t.value+(m.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(f.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
-"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});h.className="geBtn gePrimaryBtn";h.setAttribute("disabled","disabled");var k=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
-mxEvent.addListener(f,"change",function(){0<f.value.length&&0<k.test(f.value)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")});mxEvent.addListener(f,"keyup",function(){0<f.value.length&&k.test(f.value)?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled")});c.appendChild(f);this.init=function(){f.focus()};var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;b=document.createElement("p");b.style.marginTop=
-"14px";b.appendChild(m);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(p);mxEvent.addListener(p,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)});c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("feedback"));c.appendChild(b);var t=document.createElement("textarea");t.style.resize="none";t.style.width="600px";t.style.height="140px";t.style.marginTop="6px";t.setAttribute("placeholder",mxResources.get("commentsNotes"));
-c.appendChild(t);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst?(b.appendChild(p),b.appendChild(h)):(b.appendChild(h),b.appendChild(p));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,c,b){var f=document.createElement("div"),h=document.createElement("h3");h.style.marginTop="0px";mxUtils.write(h,mxResources.get("revisionHistory"));f.appendChild(h);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";f.appendChild(k);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height=
-"376px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);f.appendChild(m);var p=new Graph(m);p.setTooltips(!1);p.setEnabled(!1);p.setPanning(!0);p.panningHandler.ignoreCell=!0;p.panningHandler.useLeftButtonForPanning=!0;p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;var t=0,d=null,g=0,n=p.getGlobalVariable;p.getGlobalVariable=function(a){return"page"==a&&null!=d&&null!=d[g]?d[g].getAttribute("name"):"pagenumber"==a?g+1:n.apply(this,arguments)};p.getLinkForCell=function(){return null};
-Editor.MathJaxRender&&p.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){a.editor.graph.mathEnabled&&Editor.MathJaxRender(p.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,w=null,y=null,l=null,x=mxUtils.button("",function(){null!=y&&p.zoomIn()});x.className="geSprite geSprite-zoomin";x.setAttribute("title",
-mxResources.get("zoomIn"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var z=mxUtils.button("",function(){null!=y&&p.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var E=mxUtils.button("",function(){null!=y&&(p.maxFitScale=8,p.fit(8),
-p.center())});E.className="geSprite geSprite-fit";E.setAttribute("title",mxResources.get("fit"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var C=mxUtils.button("",function(){null!=y&&(p.zoomActual(),p.center())});C.className="geSprite geSprite-actualsize";C.setAttribute("title",mxResources.get("actualSize"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");
+"text");f.style.marginTop="6px";f.style.width="600px";var k=mxUtils.button(mxResources.get("sendMessage"),function(){var b=p.value+(m.checked?"\nDiagram:\n"+mxUtils.getXml(a.getXmlFileData()):"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(f.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+
+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});k.className="geBtn gePrimaryBtn";k.setAttribute("disabled","disabled");var h=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+mxEvent.addListener(f,"change",function(){0<f.value.length&&0<h.test(f.value)?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled")});mxEvent.addListener(f,"keyup",function(){0<f.value.length&&h.test(f.value)?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled")});c.appendChild(f);this.init=function(){f.focus()};var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;b=document.createElement("p");b.style.marginTop=
+"14px";b.appendChild(m);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("includeCopyOfMyDiagram"));b.appendChild(t);mxEvent.addListener(t,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)});c.appendChild(b);b=document.createElement("div");mxUtils.write(b,mxResources.get("feedback"));c.appendChild(b);var p=document.createElement("textarea");p.style.resize="none";p.style.width="600px";p.style.height="140px";p.style.marginTop="6px";p.setAttribute("placeholder",mxResources.get("commentsNotes"));
+c.appendChild(p);b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst?(b.appendChild(t),b.appendChild(k)):(b.appendChild(k),b.appendChild(t));c.appendChild(b);this.container=c};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(a,c,b){var f=document.createElement("div"),k=document.createElement("h3");k.style.marginTop="0px";mxUtils.write(k,mxResources.get("revisionHistory"));f.appendChild(k);var h=document.createElement("div");h.style.position="absolute";h.style.overflow="auto";h.style.width="170px";h.style.height="378px";f.appendChild(h);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height=
+"376px";m.style.overflow="hidden";mxEvent.disableContextMenu(m);f.appendChild(m);var t=new Graph(m);t.setTooltips(!1);t.setEnabled(!1);t.setPanning(!0);t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var p=0,d=null,g=0,n=t.getGlobalVariable;t.getGlobalVariable=function(a){return"page"==a&&null!=d&&null!=d[g]?d[g].getAttribute("name"):"pagenumber"==a?g+1:n.apply(this,arguments)};t.getLinkForCell=function(){return null};
+Editor.MathJaxRender&&t.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){a.editor.graph.mathEnabled&&Editor.MathJaxRender(t.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,w=null,y=null,l=null,x=mxUtils.button("",function(){null!=y&&t.zoomIn()});x.className="geSprite geSprite-zoomin";x.setAttribute("title",
+mxResources.get("zoomIn"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var z=mxUtils.button("",function(){null!=y&&t.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var E=mxUtils.button("",function(){null!=y&&(t.maxFitScale=8,t.fit(8),
+t.center())});E.className="geSprite geSprite-fit";E.setAttribute("title",mxResources.get("fit"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var C=mxUtils.button("",function(){null!=y&&(t.zoomActual(),t.center())});C.className="geSprite geSprite-actualsize";C.setAttribute("title",mxResources.get("actualSize"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");
mxUtils.setOpacity(C,20);var B=document.createElement("div");B.style.position="absolute";B.style.textAlign="right";B.style.color="gray";B.style.marginTop="10px";B.style.backgroundColor="transparent";B.style.top="440px";B.style.right="32px";B.style.maxWidth="380px";B.style.cursor="default";var H=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,d=mxUtils.getXml(y.documentElement);a.isLocalFileSave()?
a.saveLocalFile(d,b,"text/xml"):(d="undefined"===typeof pako?"&xml="+encodeURIComponent(d):"&data="+encodeURIComponent(a.editor.graph.compress(d)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+d)).simulate(document,"_blank"))}});H.className="geBtn";H.setAttribute("disabled","disabled");var D=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=l&&a.confirm(mxResources.get("areYouSure"),function(){null!=b?b(l):a.spinner.spin(document.body,mxResources.get("restoring"))&&
u.save(!0,function(b){a.spinner.stop();a.replaceFileData(l);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});D.className="geBtn";D.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var I=null;mxEvent.addListener(F,
"change",function(a){null!=I&&(I(a),mxEvent.consume(a))});var A=mxUtils.button(mxResources.get("open"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),a.openLink(a.getUrl(),null,!0))});A.className="geBtn";A.setAttribute("disabled","disabled");null!=b&&(A.style.display="none");var G=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl(F.selectedIndex))});G.className="geBtn gePrimaryBtn";
-G.setAttribute("disabled","disabled");null!=b&&(G.style.display="none",D.className="geBtn gePrimaryBtn");h=document.createElement("div");h.style.position="absolute";h.style.top="482px";h.style.width="640px";h.style.textAlign="right";var J=document.createElement("div");J.className="geToolbarContainer";J.style.backgroundColor="transparent";J.style.padding="2px";J.style.border="none";J.style.left="199px";J.style.top="442px";var M=null;if(null!=c&&0<c.length){m.style.cursor="move";var L=document.createElement("table");
-L.style.border="1px solid lightGray";L.style.borderCollapse="collapse";L.style.borderSpacing="0px";L.style.width="100%";var T=document.createElement("tbody"),R=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(t=mxUtils.indexOf(a.pages,a.currentPage));for(var V=c.length-1;0<=V;V--){var Y=function(b){var n=new Date(b.modifiedDate),f=null;if(0<=n.getTime()){var h=function(c){q.stop();var w=mxUtils.parseXml(c),v=a.editor.extractGraphModel(w.documentElement,!0);if(null!=v){var h=function(b){null!=
-b&&(b=k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},k=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";m.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,p.getModel());p.maxFitScale=1;p.fit(8);p.center();return a};F.style.display="none";F.innerHTML="";y=w;l=c;d=parseSelectFunction=null;g=0;if("mxfile"==v.nodeName){w=v.getElementsByTagName("diagram");d=[];for(c=0;c<w.length;c++)d.push(w[c]);
-g=Math.min(t,d.length-1);0<d.length&&h(d[g]);if(1<d.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<d.length;c++)w=document.createElement("option"),mxUtils.write(w,d[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),w.setAttribute("value",c),c==g&&w.setAttribute("selected","selected"),F.appendChild(w);I=function(){g=t=parseInt(F.value);h(d[t])}}else k(v);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");B.innerHTML="";mxUtils.write(B,(null!=
+G.setAttribute("disabled","disabled");null!=b&&(G.style.display="none",D.className="geBtn gePrimaryBtn");k=document.createElement("div");k.style.position="absolute";k.style.top="482px";k.style.width="640px";k.style.textAlign="right";var J=document.createElement("div");J.className="geToolbarContainer";J.style.backgroundColor="transparent";J.style.padding="2px";J.style.border="none";J.style.left="199px";J.style.top="442px";var M=null;if(null!=c&&0<c.length){m.style.cursor="move";var L=document.createElement("table");
+L.style.border="1px solid lightGray";L.style.borderCollapse="collapse";L.style.borderSpacing="0px";L.style.width="100%";var T=document.createElement("tbody"),R=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(p=mxUtils.indexOf(a.pages,a.currentPage));for(var V=c.length-1;0<=V;V--){var Y=function(b){var n=new Date(b.modifiedDate),f=null;if(0<=n.getTime()){var h=function(c){q.stop();var w=mxUtils.parseXml(c),v=a.editor.extractGraphModel(w.documentElement,!0);if(null!=v){var h=function(b){null!=
+b&&(b=k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},k=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";m.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,t.getModel());t.maxFitScale=1;t.fit(8);t.center();return a};F.style.display="none";F.innerHTML="";y=w;l=c;d=parseSelectFunction=null;g=0;if("mxfile"==v.nodeName){w=v.getElementsByTagName("diagram");d=[];for(c=0;c<w.length;c++)d.push(w[c]);
+g=Math.min(p,d.length-1);0<d.length&&h(d[g]);if(1<d.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<d.length;c++)w=document.createElement("option"),mxUtils.write(w,d[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),w.setAttribute("value",c),c==g&&w.setAttribute("selected","selected"),F.appendChild(w);I=function(){g=p=parseInt(F.value);h(d[p])}}else k(v);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");B.innerHTML="";mxUtils.write(B,(null!=
c?c+" ":"")+n.toLocaleDateString()+" "+n.toLocaleTimeString());B.setAttribute("title",f.getAttribute("title"));x.removeAttribute("disabled");z.removeAttribute("disabled");E.removeAttribute("disabled");C.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&D.removeAttribute("disabled"),H.removeAttribute("disabled"),G.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(x,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(C,
60)}else F.style.display="none",F.innerHTML="",B.innerHTML="",mxUtils.write(B,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(k,mxResources.get("current")):n.toDateString()===R?mxUtils.write(k,n.toLocaleTimeString()):mxUtils.write(k,n.toLocaleDateString()+" "+n.toLocaleTimeString());
-f.appendChild(k);f.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){w!=b&&(q.stop(),null!=v&&(v.style.backgroundColor=""),w=b,v=f,v.style.backgroundColor="#ebf2f9",l=y=null,B.removeAttribute("title"),B.innerHTML=mxResources.get("loading")+"...",m.style.backgroundColor="#ffffff",p.getModel().clear(),D.setAttribute("disabled","disabled"),
+f.appendChild(k);f.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){w!=b&&(q.stop(),null!=v&&(v.style.backgroundColor=""),w=b,v=f,v.style.backgroundColor="#ebf2f9",l=y=null,B.removeAttribute("title"),B.innerHTML=mxResources.get("loading")+"...",m.style.backgroundColor="#ffffff",t.getModel().clear(),D.setAttribute("disabled","disabled"),
H.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(x,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(C,20),q.spin(m),b.getXml(function(a){w==b&&h(a)},function(a){q.stop();F.style.display="none";F.innerHTML=
-"";B.innerHTML="";mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){G.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(f)}return f}(c[V]);null!=Y&&V==c.length-1&&(M=Y)}L.appendChild(T);k.appendChild(L)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(m.style.display=
-"none",J.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(m.style.display="none",J.style.display="none",mxUtils.write(k,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn";J.appendChild(F);J.appendChild(x);J.appendChild(z);J.appendChild(C);J.appendChild(E);a.editor.cancelFirst?(h.appendChild(k),h.appendChild(H),h.appendChild(A),h.appendChild(D),h.appendChild(G)):(h.appendChild(H),
-h.appendChild(A),h.appendChild(D),h.appendChild(G),h.appendChild(k));f.appendChild(h);f.appendChild(J);f.appendChild(B);this.container=f},DraftDialog=function(a,c,b,f,h,k,m,p){var t=document.createElement("div"),d=document.createElement("div");d.style.marginTop="0px";d.style.whiteSpace="nowrap";d.style.overflow="auto";mxUtils.write(d,c);t.appendChild(d);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.marginTop="10px";g.style.width="640px";
-g.style.top="46px";g.style.bottom="74px";g.style.overflow="hidden";mxEvent.disableContextMenu(g);t.appendChild(g);var n=new Graph(g);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;c=mxUtils.parseXml(b);var q=a.editor.extractGraphModel(c.documentElement,!0),u=0,v=null,w=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):
+"";B.innerHTML="";mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){G.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(f)}return f}(c[V]);null!=Y&&V==c.length-1&&(M=Y)}L.appendChild(T);h.appendChild(L)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(m.style.display=
+"none",J.style.display="none",mxUtils.write(h,mxResources.get("notAvailable"))):(m.style.display="none",J.style.display="none",mxUtils.write(h,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.className="geBtn";J.appendChild(F);J.appendChild(x);J.appendChild(z);J.appendChild(C);J.appendChild(E);a.editor.cancelFirst?(k.appendChild(h),k.appendChild(H),k.appendChild(A),k.appendChild(D),k.appendChild(G)):(k.appendChild(H),
+k.appendChild(A),k.appendChild(D),k.appendChild(G),k.appendChild(h));f.appendChild(k);f.appendChild(J);f.appendChild(B);this.container=f},DraftDialog=function(a,c,b,f,k,h,m,t){var p=document.createElement("div"),d=document.createElement("div");d.style.marginTop="0px";d.style.whiteSpace="nowrap";d.style.overflow="auto";mxUtils.write(d,c);p.appendChild(d);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.marginTop="10px";g.style.width="640px";
+g.style.top="46px";g.style.bottom="74px";g.style.overflow="hidden";mxEvent.disableContextMenu(g);p.appendChild(g);var n=new Graph(g);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;c=mxUtils.parseXml(b);var q=a.editor.extractGraphModel(c.documentElement,!0),u=0,v=null,w=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=v&&null!=v[u]?v[u].getAttribute("name"):
"pagenumber"==a?u+1:w.apply(this,arguments)};n.getLinkForCell=function(){return null};c=mxUtils.button("",function(){n.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);b=mxUtils.button("",function(){n.zoomOut()});b.className="geSprite geSprite-zoomout";b.setAttribute("title",mxResources.get("zoomOut"));b.style.outline="none";b.style.border="none";b.style.margin=
"2px";mxUtils.setOpacity(b,60);d=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);var y=mxUtils.button("",function(){n.zoomActual();n.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";mxUtils.setOpacity(y,
-60);h=mxUtils.button(m||mxResources.get("discard"),h);h.className="geBtn";var l=document.createElement("select");l.style.maxWidth="80px";l.style.position="relative";l.style.top="-2px";l.style.verticalAlign="bottom";l.style.marginRight="6px";l.style.display="none";f=mxUtils.button(k||mxResources.get("edit"),f);f.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";m=document.createElement("div");
+60);k=mxUtils.button(m||mxResources.get("discard"),k);k.className="geBtn";var l=document.createElement("select");l.style.maxWidth="80px";l.style.position="relative";l.style.top="-2px";l.style.verticalAlign="bottom";l.style.marginRight="6px";l.style.display="none";f=mxUtils.button(h||mxResources.get("edit"),f);f.className="geBtn gePrimaryBtn";h=document.createElement("div");h.style.position="absolute";h.style.bottom="30px";h.style.width="640px";h.style.textAlign="right";m=document.createElement("div");
m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";g.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function d(d){null!=d&&(d=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(d))).documentElement));
return d}mxEvent.addListener(l,"change",function(a){u=parseInt(l.value);d(v[u]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var c=q.getElementsByTagName("diagram");v=[];for(var f=0;f<c.length;f++)v.push(c[f]);0<v.length&&d(v[u]);if(1<v.length)for(l.style.display="",f=0;f<v.length;f++)c=document.createElement("option"),mxUtils.write(c,v[f].getAttribute("name")||mxResources.get("pageWithNumber",[f+1])),c.setAttribute("value",f),f==u&&c.setAttribute("selected","selected"),l.appendChild(c)}else b(q)};
-m.appendChild(l);m.appendChild(c);m.appendChild(b);m.appendChild(y);m.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";p=null!=p?mxUtils.button(mxResources.get("ignore"),p):null;null!=p&&(p.className="geBtn");a.editor.cancelFirst?(k.appendChild(c),null!=p&&k.appendChild(p),k.appendChild(h),k.appendChild(f)):(k.appendChild(f),k.appendChild(h),null!=p&&k.appendChild(p),k.appendChild(c));t.appendChild(k);t.appendChild(m);this.container=t},FindWindow=
-function(a,c,b,f,h){function k(a,b,d){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var g=0;g<b.length;g++)if("label"!=b[g].nodeName){var c=mxUtils.trim(b[g].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&c.substring(0,d.length)===d||null!=a&&a.test(c))return!0}}return!1}function m(){var a=t.model.getDescendants(t.model.getRoot()),b=q.value.toLowerCase(),c=u.checked?new RegExp(b):null,n=null;d!=b&&(d=b,g=null);var f=null==g;if(0<b.length)for(var v=
-0;v<a.length;v++){var h=t.view.getState(a[v]);if(null!=h&&null!=h.cell.value&&(f||null==n)&&(t.model.isVertex(h.cell)||t.model.isEdge(h.cell))&&(t.isHtmlLabel(h.cell)?(w.innerHTML=t.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([w])):label=t.getLabel(h.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||k(c,h.cell,b))||null!=c&&(c.test(label)||k(c,h.cell,b))))if(f){n=h;break}else null==n&&(n=h);f=f||h==g}null!=
-n?(g=n,t.scrollCellToVisible(g.cell),t.isEnabled()?t.setSelectionCell(g.cell):t.highlightCell(g.cell)):t.isEnabled()&&t.clearSelection();return 0==b.length||null!=n}var p=a.actions.get("find"),t=a.editor.graph,d=null,g=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom=
+m.appendChild(l);m.appendChild(c);m.appendChild(b);m.appendChild(y);m.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";t=null!=t?mxUtils.button(mxResources.get("ignore"),t):null;null!=t&&(t.className="geBtn");a.editor.cancelFirst?(h.appendChild(c),null!=t&&h.appendChild(t),h.appendChild(k),h.appendChild(f)):(h.appendChild(f),h.appendChild(k),null!=t&&h.appendChild(t),h.appendChild(c));p.appendChild(h);p.appendChild(m);this.container=p},FindWindow=
+function(a,c,b,f,k){function h(a,b,d){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var g=0;g<b.length;g++)if("label"!=b[g].nodeName){var c=mxUtils.trim(b[g].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&c.substring(0,d.length)===d||null!=a&&a.test(c))return!0}}return!1}function m(){var a=p.model.getDescendants(p.model.getRoot()),b=q.value.toLowerCase(),c=u.checked?new RegExp(b):null,n=null;d!=b&&(d=b,g=null);var f=null==g;if(0<b.length)for(var v=
+0;v<a.length;v++){var k=p.view.getState(a[v]);if(null!=k&&null!=k.cell.value&&(f||null==n)&&(p.model.isVertex(k.cell)||p.model.isEdge(k.cell))&&(p.isHtmlLabel(k.cell)?(w.innerHTML=p.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([w])):label=p.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||h(c,k.cell,b))||null!=c&&(c.test(label)||h(c,k.cell,b))))if(f){n=k;break}else null==n&&(n=k);f=f||k==g}null!=
+n?(g=n,p.scrollCellToVisible(g.cell),p.isEnabled()?p.setSelectionCell(g.cell):p.highlightCell(g.cell)):p.isEnabled()&&p.clearSelection();return 0==b.length||null!=n}var t=a.actions.get("find"),p=a.editor.graph,d=null,g=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom=
"6px";q.style.width="200px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";n.appendChild(q);mxUtils.br(n);var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";n.appendChild(u);mxUtils.write(n,mxResources.get("regularExpression"));var v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";n.appendChild(v);var w=document.createElement("div");
mxUtils.br(n);v=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";d=g=null;q.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";n.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=m()?"":"#ffcfcf"}catch(y){a.handleError(y)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";
-n.appendChild(v);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)p.funct();else if(d!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=m()?"":"#ffcfcf"}catch(l){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(p.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,c,b,f,h,!0,!0);this.window.destroyOnClose=
-!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):t.container.focus()}))},TagsWindow=function(a,c,b,f,h){var k=a.editor.graph,m="tags",p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.padding=
-"10px";p.style.height="100%";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("allTags"));t.setAttribute("type","text");t.style.marginTop="4px";t.style.width="260px";t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px";p.appendChild(t);if(!a.isOffline()||mxClient.IS_CHROMEAPP){t.style.width="240px";var d=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");d.firstChild.style.marginBottom="6px";d.style.marginLeft=
-"6px";p.appendChild(d)}mxEvent.addListener(t,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});t.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(p);d=mxUtils.button(mxResources.get("hide"),function(){var a=k.getCellsForTags(t.value.split(" "),void 0,m);k.setCellsVisible(a,!1)});d.setAttribute("title",
-mxResources.get("hide"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";p.appendChild(d);d=mxUtils.button(mxResources.get("show"),function(){var a=k.getCellsForTags(t.value.split(" "),void 0,m);k.setCellsVisible(a,!0);if(k.isEnabled())k.setSelectionCells(a);else for(var b=0;b<a.length;b++)k.highlightCell(a[b])});d.setAttribute("title",mxResources.get("show"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";p.appendChild(d);var g=a.actions.get("tags"),d=
-mxUtils.button(mxResources.get("close"),function(){g.funct()});d.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");d.style.marginTop="8px";d.className="geBtn gePrimaryBtn";p.appendChild(d);mxEvent.addListener(t,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||g.funct()});this.window=new mxWindow(mxResources.get("tags"),p,c,b,f,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,
-function(){this.window.isVisible()?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)):k.container.focus()}))},AuthDialog=function(a,c,b,f){var h=document.createElement("div");h.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("authorizationRequired"));var m="Unknown",p=document.createElement("img");
-p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.marginRight="10px";c==a.drive?(m=mxResources.get("googleDrive"),p.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(m=mxResources.get("dropbox"),p.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(m=mxResources.get("oneDrive"),p.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(m=mxResources.get("github"),p.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(m=mxResources.get("trello"),p.src=IMAGE_PATH+
-"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var t=document.createElement("input");t.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){f(t.checked)});m.insertBefore(p,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";h.appendChild(k);h.appendChild(a);h.appendChild(m);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(t),k=document.createElement("span"),mxUtils.write(k,
-" "+mxResources.get("rememberMe")),b.appendChild(k),h.appendChild(b),t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)}));this.container=h},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var f=document.createElement("div"),h=[];if(null!=a.sidebar.customEntries)for(var k=0;k<a.sidebar.customEntries.length;k++){for(var m=a.sidebar.customEntries[k],p={title:a.getResource(m.title),entries:[]},t=0;t<m.entries.length;t++){var d=
-m.entries[t];p.entries.push({id:d.id,title:a.getResource(d.title),desc:a.getResource(d.desc),image:d.preview})}h.push(p)}for(k=0;k<b.length;k++)if(null==a.sidebar.enabledLibraries)h.push(b[k]);else{p={title:b[k].title,entries:[]};for(t=0;t<b[k].entries.length;t++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[k].entries[t].id)&&p.entries.push(b[k].entries[t]);0<p.entries.length&&h.push(p)}b=h;if(c){t=document.createElement("div");t.className="geDialogTitle";mxUtils.write(t,mxResources.get("shapes"));
-t.style.position="absolute";t.style.top="0px";t.style.left="0px";t.style.lineHeight="40px";t.style.height="40px";t.style.right="0px";mxClient.IS_QUIRKS&&(t.style.width="718px");var g=document.createElement("div"),n=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";mxClient.IS_QUIRKS&&(g.style.height="437px",g.style.marginTop="1px");n.style.position="absolute";n.style.left="202px";n.style.right=
-"0px";n.style.top="40px";n.style.bottom="60px";n.style.overflow="auto";n.style.borderLeft="1px solid rgb(211, 211, 211)";n.style.textAlign="center";mxClient.IS_QUIRKS&&(n.style.width=parseInt(t.style.width)-202+"px",n.style.height=g.style.height,n.style.marginTop=g.style.marginTop);var q=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";for(k=0;k<b.length;k++)(function(b){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=
+n.appendChild(v);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)t.funct();else if(d!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=m()?"":"#ffcfcf"}catch(l){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(t.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,c,b,f,k,!0,!0);this.window.destroyOnClose=
+!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):p.container.focus()}))},TagsWindow=function(a,c,b,f,k){var h=a.editor.graph,m="tags",t=document.createElement("div");t.style.userSelect="none";t.style.overflow="hidden";t.style.padding=
+"10px";t.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("allTags"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.width="260px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";t.appendChild(p);if(!a.isOffline()||mxClient.IS_CHROMEAPP){p.style.width="240px";var d=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");d.firstChild.style.marginBottom="6px";d.style.marginLeft=
+"6px";t.appendChild(d)}mxEvent.addListener(p,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});p.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(t);d=mxUtils.button(mxResources.get("hide"),function(){var a=h.getCellsForTags(p.value.split(" "),void 0,m);h.setCellsVisible(a,!1)});d.setAttribute("title",
+mxResources.get("hide"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";t.appendChild(d);d=mxUtils.button(mxResources.get("show"),function(){var a=h.getCellsForTags(p.value.split(" "),void 0,m);h.setCellsVisible(a,!0);if(h.isEnabled())h.setSelectionCells(a);else for(var b=0;b<a.length;b++)h.highlightCell(a[b])});d.setAttribute("title",mxResources.get("show"));d.style.marginTop="8px";d.style.marginRight="4px";d.className="geBtn";t.appendChild(d);var g=a.actions.get("tags"),d=
+mxUtils.button(mxResources.get("close"),function(){g.funct()});d.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");d.style.marginTop="8px";d.className="geBtn gePrimaryBtn";t.appendChild(d);mxEvent.addListener(p,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||g.funct()});this.window=new mxWindow(mxResources.get("tags"),t,c,b,f,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,
+function(){this.window.isVisible()?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):h.container.focus()}))},AuthDialog=function(a,c,b,f){var k=document.createElement("div");k.style.textAlign="center";var h=document.createElement("p");h.style.fontSize="16pt";h.style.padding="0px";h.style.margin="0px";h.style.color="gray";mxUtils.write(h,mxResources.get("authorizationRequired"));var m="Unknown",t=document.createElement("img");
+t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.marginRight="10px";c==a.drive?(m=mxResources.get("googleDrive"),t.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(m=mxResources.get("dropbox"),t.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(m=mxResources.get("oneDrive"),t.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(m=mxResources.get("github"),t.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(m=mxResources.get("trello"),t.src=IMAGE_PATH+
+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var p=document.createElement("input");p.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){f(p.checked)});m.insertBefore(t,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";k.appendChild(h);k.appendChild(a);k.appendChild(m);b&&(b=document.createElement("p"),b.style.marginTop="20px",b.appendChild(p),h=document.createElement("span"),mxUtils.write(h,
+" "+mxResources.get("rememberMe")),b.appendChild(h),k.appendChild(b),p.checked=!0,p.defaultChecked=!0,mxEvent.addListener(h,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)}));this.container=k},MoreShapesDialog=function(a,c,b){b=null!=b?b:a.sidebar.entries;var f=document.createElement("div"),k=[];if(null!=a.sidebar.customEntries)for(var h=0;h<a.sidebar.customEntries.length;h++){for(var m=a.sidebar.customEntries[h],t={title:a.getResource(m.title),entries:[]},p=0;p<m.entries.length;p++){var d=
+m.entries[p];t.entries.push({id:d.id,title:a.getResource(d.title),desc:a.getResource(d.desc),image:d.preview})}k.push(t)}for(h=0;h<b.length;h++)if(null==a.sidebar.enabledLibraries)k.push(b[h]);else{t={title:b[h].title,entries:[]};for(p=0;p<b[h].entries.length;p++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,b[h].entries[p].id)&&t.entries.push(b[h].entries[p]);0<t.entries.length&&k.push(t)}b=k;if(c){p=document.createElement("div");p.className="geDialogTitle";mxUtils.write(p,mxResources.get("shapes"));
+p.style.position="absolute";p.style.top="0px";p.style.left="0px";p.style.lineHeight="40px";p.style.height="40px";p.style.right="0px";mxClient.IS_QUIRKS&&(p.style.width="718px");var g=document.createElement("div"),n=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";mxClient.IS_QUIRKS&&(g.style.height="437px",g.style.marginTop="1px");n.style.position="absolute";n.style.left="202px";n.style.right=
+"0px";n.style.top="40px";n.style.bottom="60px";n.style.overflow="auto";n.style.borderLeft="1px solid rgb(211, 211, 211)";n.style.textAlign="center";mxClient.IS_QUIRKS&&(n.style.width=parseInt(p.style.width)-202+"px",n.style.height=g.style.height,n.style.marginTop=g.style.marginTop);var q=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";for(h=0;h<b.length;h++)(function(b){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=
"dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);g.appendChild(d);for(var c=0;c<b.entries.length;c++)(function(b){var d=v.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";var l=document.createElement("input");l.setAttribute("type","checkbox");l.checked=a.sidebar.isEntryVisible(b.id);l.defaultChecked=l.checked;d.appendChild(l);mxUtils.write(d," "+b.title);g.appendChild(d);var f=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){n.style.textAlign=
"center";n.style.padding="0px";n.style.color="";n.innerHTML="";if(null!=b.desc){var g=document.createElement("pre");g.style.boxSizing="border-box";g.style.fontFamily="inherit";g.style.margin="20px";g.style.right="0px";g.style.textAlign="left";mxUtils.write(g,b.desc);n.appendChild(g)}null!=b.imageCallback?b.imageCallback(n):null!=b.image?n.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(n.style.padding="20px",n.style.color="rgb(179, 179, 179)",mxUtils.write(n,mxResources.get("noPreview")));
-null!=q&&(q.style.backgroundColor="");q=d;q.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",f);mxEvent.addListener(d,"dblclick",function(a){l.checked=!l.checked;mxEvent.consume(a)});u.push(function(){return l.checked?b.id:null});0==k&&0==c&&f()})(b.entries[c])})(b[k]);f.style.padding="30px";f.appendChild(t);f.appendChild(g);f.appendChild(n);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";
-b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=t.style.width,b.style.paddingTop="12px");var w=document.createElement("input");w.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)t=document.createElement("span"),t.style.paddingRight="20px",t.appendChild(w),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),w.checked=!0,w.defaultChecked=
-!0,mxEvent.addListener(t,"click",function(a){mxEvent.getSource(a)!=w&&(w.checked=!w.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(t.style.position="relative",t.style.top="-6px"),b.appendChild(t);t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],d=0;d<u.length;d++){var g=u[d].apply(this,arguments);null!=g&&b.push(g)}a.sidebar.showEntries(b.join(";"),w.checked,!0)});c.className=
-"geBtn gePrimaryBtn"}else{var y=document.createElement("table"),t=document.createElement("tbody");f.style.height="100%";f.style.overflow="auto";p=document.createElement("tr");y.style.width="100%";c=document.createElement("td");var h=document.createElement("td"),m=document.createElement("td"),l=mxUtils.bind(this,function(b,d,g){var c=document.createElement("input");c.type="checkbox";y.appendChild(c);c.checked=a.sidebar.isEntryVisible(g);var l=document.createElement("span");mxUtils.write(l,d);d=document.createElement("div");
-d.style.display="block";d.appendChild(c);d.appendChild(l);mxEvent.addListener(l,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});b.appendChild(d);return function(){return c.checked?g:null}});p.appendChild(c);p.appendChild(h);p.appendChild(m);t.appendChild(p);y.appendChild(t);for(var u=[],x=0,k=0;k<b.length;k++)for(t=0;t<b[k].entries.length;t++)x++;for(var z=[c,h,m],E=0,k=0;k<b.length;k++)(function(a){for(var b=0;b<a.entries.length;b++){var d=a.entries[b];u.push(l(z[Math.floor(E/(x/3))],
-d.title,d.id));E++}})(b[k]);f.appendChild(y);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";w=document.createElement("input");isLocalStorage&&(w.setAttribute("type","checkbox"),w.checked=!0,w.defaultChecked=!0,b.appendChild(w),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),b.appendChild(t),mxEvent.addListener(t,"click",function(a){w.checked=!w.checked;mxEvent.consume(a)}));f.appendChild(b);t=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});t.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],d=0;d<u.length;d++){var g=u[d].apply(this,arguments);null!=g&&b.push(g)}a.sidebar.showEntries(0<b.length?b.join(";"):"",w.checked);a.hideDialog()});c.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right"}a.editor.cancelFirst?(b.appendChild(t),b.appendChild(c)):(b.appendChild(c),b.appendChild(t));f.appendChild(b);this.container=
-f},PluginsDialog=function(a){function c(){if(0==h.length)f.innerHTML=mxResources.get("noPlugins");else{f.innerHTML="";for(var b=0;b<h.length;b++){var d=document.createElement("span");d.style.whiteSpace="nowrap";var q=document.createElement("span");q.className="geSprite geSprite-delete";q.style.position="relative";q.style.cursor="pointer";q.style.top="5px";q.style.marginRight="4px";q.style.display="inline-block";d.appendChild(q);mxUtils.write(d,h[b]);f.appendChild(d);mxUtils.br(f);mxEvent.addListener(q,
-"click",function(b){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+h[b]+'"?',function(){h.splice(b,1);c()})}}(b))}}}var b=document.createElement("div"),f=document.createElement("div");f.style.height="120px";f.style.overflow="auto";var h=mxSettings.getPlugins().slice();b.appendChild(f);c();var k=mxUtils.button(mxResources.get("add"),function(){var b="",d=urlParams.p;if(null!=d&&0<d.length){for(var f=d.split(";"),d=0;d<f.length;d++){var u=App.pluginRegistry[f[d]];null!=u&&
-(b+=u+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){f=a.split(";");for(a=0;a<f.length;a++){var b=f[a],d=App.pluginRegistry[b];null!=d&&(b=d);0<b.length&&0>mxUtils.indexOf(h,b)&&h.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});k.className="geBtn";var m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-m.className="geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(h);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});p.className="geBtn gePrimaryBtn";var t=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});t.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(t.style.display="none");var d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
-"right";a.editor.cancelFirst?(d.appendChild(m),d.appendChild(t),d.appendChild(k),d.appendChild(p)):(d.appendChild(t),d.appendChild(k),d.appendChild(p),d.appendChild(m));b.appendChild(d);this.container=b},CropImageDialog=function(a,c,b){var f=document.createElement("div"),h=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),p=document.createElement("td");p.style.whiteSpace="nowrap";p.setAttribute("colspan","2");mxUtils.write(p,mxResources.get("loading")+
-"...");m.appendChild(p);k.appendChild(m);var m=document.createElement("tr"),t=document.createElement("td"),d=document.createElement("td");h.style.paddingLeft="6px";mxUtils.write(t,mxResources.get("left")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value="0";this.init=function(){g.focus();g.select()};d.appendChild(g);m.appendChild(t);m.appendChild(d);k.appendChild(m);m=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");
-mxUtils.write(t,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";d.appendChild(n);m.appendChild(t);m.appendChild(d);k.appendChild(m);m=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";d.appendChild(q);m.appendChild(t);m.appendChild(d);
-k.appendChild(m);m=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";d.appendChild(u);m.appendChild(t);m.appendChild(d);k.appendChild(m);m=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("circle")+":");m.appendChild(t);var v=document.createElement("input");
-v.setAttribute("type","checkbox");d.appendChild(v);m.appendChild(d);k.appendChild(m);h.appendChild(k);f.appendChild(h);var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var d=document.createElement("canvas"),c=d.getContext("2d"),f=w.width,h=w.height,k=parseInt(g.value),m=parseInt(n.value),f=Math.max(1,f-k-parseInt(q.value)),h=Math.max(1,h-m-parseInt(u.value));d.width=f;d.height=h;v.checked&&(c.fillStyle=
-"#000000",c.arc(f/2,h/2,Math.min(f/2,h/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,k,m,f,h,0,0,f,h);b(d.toDataURL())});y.setAttribute("disabled","disabled");w.onload=function(){y.removeAttribute("disabled");p.innerHTML="";mxUtils.write(p,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+": "+w.height)};w.src=c;mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&y.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign=
-"right";a.editor.cancelFirst?(c.appendChild(h),c.appendChild(y)):(c.appendChild(y),c.appendChild(h));f.appendChild(c);this.container=f},EditGeometryDialog=function(a,c){var b=a.editor.graph,f=1==c.length?b.getCellGeometry(c[0]):null,h=document.createElement("div"),k=document.createElement("table"),m=document.createElement("tbody"),p=document.createElement("tr"),t=document.createElement("td"),d=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(t,mxResources.get("relative")+":");
-var g=document.createElement("input");g.setAttribute("type","checkbox");null!=f&&f.relative&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);this.init=function(){g.focus()};d.appendChild(g);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("left")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=f?f.x:"";
-d.appendChild(n);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=f?f.y:"";d.appendChild(q);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("dx")+
-":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=f&&null!=f.offset?f.offset.x:"";d.appendChild(u);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=f&&null!=f.offset?f.offset.y:"";d.appendChild(v);p.appendChild(t);
-p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("width")+":");var w=document.createElement("input");w.setAttribute("type","text");w.style.width="100px";w.value=null!=f?f.width:"";d.appendChild(w);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("height")+":");var y=
-document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=f?f.height:"";d.appendChild(y);p.appendChild(t);p.appendChild(d);m.appendChild(p);p=document.createElement("tr");t=document.createElement("td");d=document.createElement("td");mxUtils.write(t,mxResources.get("rotation")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
-d.appendChild(l);p.appendChild(t);p.appendChild(d);m.appendChild(p);k.appendChild(m);h.appendChild(k);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var f=b.getCellGeometry(c[d]);null!=f&&(f=f.clone(),b.isCellMovable(c[d])&&(f.relative=g.checked,0<mxUtils.trim(n.value).length&&(f.x=Number(n.value)),0<mxUtils.trim(q.value).length&&
+null!=q&&(q.style.backgroundColor="");q=d;q.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",f);mxEvent.addListener(d,"dblclick",function(a){l.checked=!l.checked;mxEvent.consume(a)});u.push(function(){return l.checked?b.id:null});0==h&&0==c&&f()})(b.entries[c])})(b[h]);f.style.padding="30px";f.appendChild(p);f.appendChild(g);f.appendChild(n);b=document.createElement("div");b.className="geDialogFooter";b.style.position="absolute";
+b.style.paddingRight="16px";b.style.color="gray";b.style.left="0px";b.style.right="0px";b.style.bottom="0px";b.style.height="60px";b.style.lineHeight="52px";mxClient.IS_QUIRKS&&(b.style.width=p.style.width,b.style.paddingTop="12px");var w=document.createElement("input");w.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)p=document.createElement("span"),p.style.paddingRight="20px",p.appendChild(w),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),w.checked=!0,w.defaultChecked=
+!0,mxEvent.addListener(p,"click",function(a){mxEvent.getSource(a)!=w&&(w.checked=!w.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(p.style.position="relative",p.style.top="-6px"),b.appendChild(p);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],d=0;d<u.length;d++){var g=u[d].apply(this,arguments);null!=g&&b.push(g)}a.sidebar.showEntries(b.join(";"),w.checked,!0)});c.className=
+"geBtn gePrimaryBtn"}else{var y=document.createElement("table"),p=document.createElement("tbody");f.style.height="100%";f.style.overflow="auto";t=document.createElement("tr");y.style.width="100%";c=document.createElement("td");var k=document.createElement("td"),m=document.createElement("td"),l=mxUtils.bind(this,function(b,d,g){var c=document.createElement("input");c.type="checkbox";y.appendChild(c);c.checked=a.sidebar.isEntryVisible(g);var n=document.createElement("span");mxUtils.write(n,d);d=document.createElement("div");
+d.style.display="block";d.appendChild(c);d.appendChild(n);mxEvent.addListener(n,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});b.appendChild(d);return function(){return c.checked?g:null}});t.appendChild(c);t.appendChild(k);t.appendChild(m);p.appendChild(t);y.appendChild(p);for(var u=[],x=0,h=0;h<b.length;h++)for(p=0;p<b[h].entries.length;p++)x++;for(var z=[c,k,m],E=0,h=0;h<b.length;h++)(function(a){for(var b=0;b<a.entries.length;b++){var d=a.entries[b];u.push(l(z[Math.floor(E/(x/3))],
+d.title,d.id));E++}})(b[h]);f.appendChild(y);b=document.createElement("div");b.style.marginTop="18px";b.style.textAlign="center";w=document.createElement("input");isLocalStorage&&(w.setAttribute("type","checkbox"),w.checked=!0,w.defaultChecked=!0,b.appendChild(w),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),b.appendChild(p),mxEvent.addListener(p,"click",function(a){w.checked=!w.checked;mxEvent.consume(a)}));f.appendChild(b);p=mxUtils.button(mxResources.get("cancel"),
+function(){a.hideDialog()});p.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],d=0;d<u.length;d++){var g=u[d].apply(this,arguments);null!=g&&b.push(g)}a.sidebar.showEntries(0<b.length?b.join(";"):"",w.checked);a.hideDialog()});c.className="geBtn gePrimaryBtn";b=document.createElement("div");b.style.marginTop="26px";b.style.textAlign="right"}a.editor.cancelFirst?(b.appendChild(p),b.appendChild(c)):(b.appendChild(c),b.appendChild(p));f.appendChild(b);this.container=
+f},PluginsDialog=function(a){function c(){if(0==k.length)f.innerHTML=mxResources.get("noPlugins");else{f.innerHTML="";for(var b=0;b<k.length;b++){var d=document.createElement("span");d.style.whiteSpace="nowrap";var q=document.createElement("span");q.className="geSprite geSprite-delete";q.style.position="relative";q.style.cursor="pointer";q.style.top="5px";q.style.marginRight="4px";q.style.display="inline-block";d.appendChild(q);mxUtils.write(d,k[b]);f.appendChild(d);mxUtils.br(f);mxEvent.addListener(q,
+"click",function(b){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+k[b]+'"?',function(){k.splice(b,1);c()})}}(b))}}}var b=document.createElement("div"),f=document.createElement("div");f.style.height="120px";f.style.overflow="auto";var k=mxSettings.getPlugins().slice();b.appendChild(f);c();var h=mxUtils.button(mxResources.get("add"),function(){var b="",d=urlParams.p;if(null!=d&&0<d.length){for(var f=d.split(";"),d=0;d<f.length;d++){var u=App.pluginRegistry[f[d]];null!=u&&
+(b+=u+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){f=a.split(";");for(a=0;a<f.length;a++){var b=f[a],d=App.pluginRegistry[b];null!=d&&(b=d);0<b.length&&0>mxUtils.indexOf(k,b)&&k.push(b)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});h.className="geBtn";var m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+m.className="geBtn";var t=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(k);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});t.className="geBtn gePrimaryBtn";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");var d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
+"right";a.editor.cancelFirst?(d.appendChild(m),d.appendChild(p),d.appendChild(h),d.appendChild(t)):(d.appendChild(p),d.appendChild(h),d.appendChild(t),d.appendChild(m));b.appendChild(d);this.container=b},CropImageDialog=function(a,c,b){var f=document.createElement("div"),k=document.createElement("table"),h=document.createElement("tbody"),m=document.createElement("tr"),t=document.createElement("td");t.style.whiteSpace="nowrap";t.setAttribute("colspan","2");mxUtils.write(t,mxResources.get("loading")+
+"...");m.appendChild(t);h.appendChild(m);var m=document.createElement("tr"),p=document.createElement("td"),d=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("left")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value="0";this.init=function(){g.focus();g.select()};d.appendChild(g);m.appendChild(p);m.appendChild(d);h.appendChild(m);m=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");
+mxUtils.write(p,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";d.appendChild(n);m.appendChild(p);m.appendChild(d);h.appendChild(m);m=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";d.appendChild(q);m.appendChild(p);m.appendChild(d);
+h.appendChild(m);m=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";d.appendChild(u);m.appendChild(p);m.appendChild(d);h.appendChild(m);m=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("circle")+":");m.appendChild(p);var v=document.createElement("input");
+v.setAttribute("type","checkbox");d.appendChild(v);m.appendChild(d);h.appendChild(m);k.appendChild(h);f.appendChild(k);var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),w=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var d=document.createElement("canvas"),c=d.getContext("2d"),f=w.width,h=w.height,k=parseInt(g.value),m=parseInt(n.value),f=Math.max(1,f-k-parseInt(q.value)),h=Math.max(1,h-m-parseInt(u.value));d.width=f;d.height=h;v.checked&&(c.fillStyle=
+"#000000",c.arc(f/2,h/2,Math.min(f/2,h/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,k,m,f,h,0,0,f,h);b(d.toDataURL())});y.setAttribute("disabled","disabled");w.onload=function(){y.removeAttribute("disabled");t.innerHTML="";mxUtils.write(t,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+": "+w.height)};w.src=c;mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&y.click()});c=document.createElement("div");c.style.marginTop="20px";c.style.textAlign=
+"right";a.editor.cancelFirst?(c.appendChild(k),c.appendChild(y)):(c.appendChild(y),c.appendChild(k));f.appendChild(c);this.container=f},EditGeometryDialog=function(a,c){var b=a.editor.graph,f=1==c.length?b.getCellGeometry(c[0]):null,k=document.createElement("div"),h=document.createElement("table"),m=document.createElement("tbody"),t=document.createElement("tr"),p=document.createElement("td"),d=document.createElement("td");h.style.paddingLeft="6px";mxUtils.write(p,mxResources.get("relative")+":");
+var g=document.createElement("input");g.setAttribute("type","checkbox");null!=f&&f.relative&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);this.init=function(){g.focus()};d.appendChild(g);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("left")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=f?f.x:"";
+d.appendChild(n);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=f?f.y:"";d.appendChild(q);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("dx")+
+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=f&&null!=f.offset?f.offset.x:"";d.appendChild(u);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=f&&null!=f.offset?f.offset.y:"";d.appendChild(v);t.appendChild(p);
+t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("width")+":");var w=document.createElement("input");w.setAttribute("type","text");w.style.width="100px";w.value=null!=f?f.width:"";d.appendChild(w);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("height")+":");var y=
+document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=f?f.height:"";d.appendChild(y);t.appendChild(p);t.appendChild(d);m.appendChild(t);t=document.createElement("tr");p=document.createElement("td");d=document.createElement("td");mxUtils.write(p,mxResources.get("rotation")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=1==c.length?mxUtils.getValue(b.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";
+d.appendChild(l);t.appendChild(p);t.appendChild(d);m.appendChild(t);h.appendChild(m);k.appendChild(h);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.getModel().beginUpdate();try{for(var d=0;d<c.length;d++){var f=b.getCellGeometry(c[d]);null!=f&&(f=f.clone(),b.isCellMovable(c[d])&&(f.relative=g.checked,0<mxUtils.trim(n.value).length&&(f.x=Number(n.value)),0<mxUtils.trim(q.value).length&&
(f.y=Number(q.value)),0<mxUtils.trim(u.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(v.value))),b.isCellResizable(c[d])&&(0<mxUtils.trim(w.value).length&&(f.width=Number(w.value)),0<mxUtils.trim(y.value).length&&(f.height=Number(y.value))),b.getModel().setGeometry(c[d],f));0<mxUtils.trim(l.value).length&&b.setCellStyles(mxConstants.STYLE_ROTATION,Number(l.value),[c[d]])}}finally{b.getModel().endUpdate()}});
-x.className="geBtn gePrimaryBtn";mxEvent.addListener(h,"keypress",function(a){13==a.keyCode&&x.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(f),k.appendChild(x)):(k.appendChild(x),k.appendChild(f));h.appendChild(k);this.container=h},LibraryDialog=function(a,c,b,f,h,k){function m(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var d=u.firstChild,
-b=0;null!=d&&d!=a;)d=d.nextSibling,b++;return b}function p(b,d,c,l,n,f,q,h,k){try{if(null==d||"image/"==d.substring(0,6))if(null==b&&null!=q||null==w[b]){var C=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));D.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var t=n,B=f;if(n>a.maxImageSize||f>
-a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,n)),a.maxImageSize/Math.max(1,f));n*=A;f*=A}t>B?(B=Math.round(100*B/t),t=100):(t=Math.round(100*t/B),B=100);var H=document.createElement("div");H.setAttribute("draggable","true");H.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";H.style.position="relative";H.style.cursor="move";mxUtils.setPrefixedStyle(H.style,"transition","transform .1s ease-in-out");if(null!=b){var F=document.createElement("img");F.setAttribute("src",z.convert(b));
-F.style.width=t+"px";F.style.height=B+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-B)/2)+"px";F.style.paddingLeft=Math.floor((100-t)/2)+"px";H.appendChild(F)}else if(null!=q){var G=a.stringToCells(a.editor.graph.decompress(q.xml));0<G.length&&(a.sidebar.createThumb(G,100,100,H,null,!0,!1),H.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",H.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border",
+x.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&x.click()});h=document.createElement("div");h.style.marginTop="20px";h.style.textAlign="right";a.editor.cancelFirst?(h.appendChild(f),h.appendChild(x)):(h.appendChild(x),h.appendChild(f));k.appendChild(h);this.container=k},LibraryDialog=function(a,c,b,f,k,h){function m(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var d=u.firstChild,
+b=0;null!=d&&d!=a;)d=d.nextSibling,b++;return b}function t(b,d,c,n,l,f,q,h,k){try{if(null==d||"image/"==d.substring(0,6))if(null==b&&null!=q||null==w[b]){var C=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));D.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var p=l,B=f;if(l>a.maxImageSize||f>
+a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,l)),a.maxImageSize/Math.max(1,f));l*=A;f*=A}p>B?(B=Math.round(100*B/p),p=100):(p=Math.round(100*p/B),B=100);var H=document.createElement("div");H.setAttribute("draggable","true");H.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";H.style.position="relative";H.style.cursor="move";mxUtils.setPrefixedStyle(H.style,"transition","transform .1s ease-in-out");if(null!=b){var F=document.createElement("img");F.setAttribute("src",z.convert(b));
+F.style.width=p+"px";F.style.height=B+"px";F.style.margin="10px";F.style.paddingBottom=Math.floor((100-B)/2)+"px";F.style.paddingLeft=Math.floor((100-p)/2)+"px";H.appendChild(F)}else if(null!=q){var G=a.stringToCells(a.editor.graph.decompress(q.xml));0<G.length&&(a.sidebar.createThumb(G,100,100,H,null,!0,!1),H.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",H.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border",
"0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.position="absolute";J.style.marginLeft="-12px";J.style.zIndex="1";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,d){mxEvent.addListener(J,"click",function(c){w[b]=null;for(var l=0;l<g.length;l++)if(null!=g[l].data&&g[l].data==b||null!=g[l].xml&&null!=d&&g[l].xml==d.xml){g.splice(l,1);break}H.parentNode.removeChild(a);0==g.length&&
(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(c)});mxEvent.addListener(J,"dblclick",function(a){mxEvent.consume(a)})})(H,b,q);H.appendChild(J);H.style.marginBottom="30px";var D=document.createElement("div");D.style.position="absolute";D.style.boxSizing="border-box";D.style.bottom="-18px";D.style.left="10px";D.style.right="10px";D.style.backgroundColor="#ffffff";D.style.overflow="hidden";D.style.textAlign="center";var L=null;null!=b?(L={data:b,
-w:n,h:f,title:k},null!=h&&(L.aspect=h),w[b]=F,g.push(L)):null!=q&&(q.aspect="fixed",g.push(q),L=q);mxEvent.addListener(D,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});C();H.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});G=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var d=new FilenameDialog(a,L.title||"",mxResources.get("ok"),
+w:l,h:f,title:k},null!=h&&(L.aspect=h),w[b]=F,g.push(L)):null!=q&&(q.aspect="fixed",g.push(q),L=q);mxEvent.addListener(D,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});C();H.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});G=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var d=new FilenameDialog(a,L.title||"",mxResources.get("ok"),
function(a){null!=a&&(L.title=a,C())},mxResources.get("enterValue"));a.showDialog(d.container,300,80,!0,!0);d.init();mxEvent.consume(b)}else if("true"!=D.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==L.title||0==L.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable","true");D.focus();document.execCommand("selectAll",!1,null);x=function(){D.removeAttribute("contentEditable");D.style.cursor=
"pointer";L.title=D.innerHTML;C()};mxEvent.consume(b)}};mxEvent.addListener(D,"click",G);mxEvent.addListener(H,"dblclick",G);u.appendChild(H);mxEvent.addListener(H,"dragstart",function(a){null==b&&null!=q&&(J.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=q.xml&&a.dataTransfer.setData("Text",q.xml);y=m(a);mxClient.IS_GC&&(H.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(H.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(H,30);J.style.visibility=
-"";D.style.visibility=""},0)});mxEvent.addListener(H,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility="",D.style.visibility="");y=null;mxUtils.setOpacity(H,100);mxUtils.setPrefixedStyle(H.style,"transform",null)})}else E||(E=!0,a.handleError({message:mxResources.get("fileExists")}));else{n=!1;try{if(a.spinner.stop(),t=mxUtils.parseXml(b),"mxlibrary"==t.documentElement.nodeName){B=JSON.parse(mxUtils.getTextContent(t.documentElement));if(null!=B&&0<B.length)for(var M=0;M<B.length;M++)null!=
-B[M].xml?p(null,null,0,0,0,0,B[M]):p(B[M].data,null,0,0,B[M].w,B[M].h,null,"fixed",B[M].title);n=!0}else if("mxfile"==t.documentElement.nodeName){for(var I=t.documentElement.getElementsByTagName("diagram"),M=0;M<I.length;M++){var B=mxUtils.getTextContent(I[M]),G=a.stringToCells(a.editor.graph.decompress(B)),S=a.editor.graph.getBoundingBoxFromGeometry(G);p(null,null,0,0,0,0,{xml:B,w:S.width,h:S.height})}n=!0}}catch(ba){}n||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}
-function t(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function d(b){b.stopPropagation();b.preventDefault();E=!1;l=m(b);if(null!=y)null!=l&&l<u.children.length?(g.splice(l>y?l-1:l,0,g.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[l])):(g.push(g.splice(y,1)[0]),u.appendChild(u.children[y]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=
-decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&a.loadImage(d,function(a){p(d,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var g=[];b=document.createElement("div");b.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";b.appendChild(n);mxUtils.write(n,mxResources.get("filename")+
-":");null==c&&(c=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",c);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==h||h.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==h||h.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};n.appendChild(q);var u=document.createElement("div");u.style.borderWidth=
+"";D.style.visibility=""},0)});mxEvent.addListener(H,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility="",D.style.visibility="");y=null;mxUtils.setOpacity(H,100);mxUtils.setPrefixedStyle(H.style,"transform",null)})}else E||(E=!0,a.handleError({message:mxResources.get("fileExists")}));else{l=!1;try{if(a.spinner.stop(),p=mxUtils.parseXml(b),"mxlibrary"==p.documentElement.nodeName){B=JSON.parse(mxUtils.getTextContent(p.documentElement));if(null!=B&&0<B.length)for(var M=0;M<B.length;M++)null!=
+B[M].xml?t(null,null,0,0,0,0,B[M]):t(B[M].data,null,0,0,B[M].w,B[M].h,null,"fixed",B[M].title);l=!0}else if("mxfile"==p.documentElement.nodeName){for(var I=p.documentElement.getElementsByTagName("diagram"),M=0;M<I.length;M++){var B=mxUtils.getTextContent(I[M]),G=a.stringToCells(a.editor.graph.decompress(B)),S=a.editor.graph.getBoundingBoxFromGeometry(G);t(null,null,0,0,0,0,{xml:B,w:S.width,h:S.height})}l=!0}}catch(ba){}l||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}
+function p(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function d(b){b.stopPropagation();b.preventDefault();E=!1;l=m(b);if(null!=y)null!=l&&l<u.children.length?(g.splice(l>y?l-1:l,0,g.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[l])):(g.push(g.splice(y,1)[0]),u.appendChild(u.children[y]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=
+decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&a.loadImage(d,function(a){t(d,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var g=[];b=document.createElement("div");b.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";b.appendChild(n);mxUtils.write(n,mxResources.get("filename")+
+":");null==c&&(c=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",c);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==k||k.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==k||k.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};n.appendChild(q);var u=document.createElement("div");u.style.borderWidth=
"1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==g.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";
-mxUtils.write(v,mxResources.get("dragImagesHere"));b.appendChild(v);var w={},y=null,l=null,x=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=x&&(x(),x=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var z=new mxUrlConverter,E=!1;if(null!=f)for(c=0;c<f.length;c++)n=f[c],p(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor=
-"";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var C=function(b){return function(d,g,c,l,n,f,q,w,z){null!=z&&(/(\.vsdx)($|\?)/i.test(z.name)||/(\.vssx)($|\?)/i.test(z.name))?a.importVisio(z,mxUtils.bind(this,function(d){a.spinner.stop();p(d,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(d,z.name)?
-a.parseFile(z,mxUtils.bind(this,function(d){4==d.readyState&&(a.spinner.stop(),200<=d.status&&299>=d.status&&(p(d.responseText,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(p(d,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",t);mxEvent.addListener(u,"drop",d);mxEvent.addListener(v,"dragover",t);mxEvent.addListener(v,
+mxUtils.write(v,mxResources.get("dragImagesHere"));b.appendChild(v);var w={},y=null,l=null,x=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=x&&(x(),x=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",c);mxEvent.addListener(u,"pointerdown",c);mxEvent.addListener(u,"touchstart",c);var z=new mxUrlConverter,E=!1;if(null!=f)for(c=0;c<f.length;c++)n=f[c],t(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor=
+"";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var C=function(b){return function(d,g,c,l,n,f,q,w,z){null!=z&&(/(\.vsdx)($|\?)/i.test(z.name)||/(\.vssx)($|\?)/i.test(z.name))?a.importVisio(z,mxUtils.bind(this,function(d){a.spinner.stop();t(d,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(d,z.name)?
+a.parseFile(z,mxUtils.bind(this,function(d){4==d.readyState&&(a.spinner.stop(),200<=d.status&&299>=d.status&&(t(d.responseText,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(t(d,g,c,l,n,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",p);mxEvent.addListener(u,"drop",d);mxEvent.addListener(v,"dragover",p);mxEvent.addListener(v,
"drop",d);b.appendChild(u);f=document.createElement("div");f.style.textAlign="right";f.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&f.appendChild(c);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(g),d=q.value;/(\.xml)$/i.test(d)||(d+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,d,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,
"filename="+encodeURIComponent(d)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";f.appendChild(n);var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(B,"change",function(b){E=!1;a.importFiles(B.files,0,0,a.maxImageSize,function(a,d,g,c,l,n,f,q,u){C(b)(a,d,g,c,l,n,f,q,u);B.value=""});u.scrollTop=u.scrollHeight}),n=mxUtils.button(mxResources.get("import"),
-function(){null!=x&&(x(),x=null);B.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",f.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=x&&(x(),x=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,d){E=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var g=a.indexOf(",");0<g&&(a=a.substring(0,g)+";base64,"+a.substring(g+1))}p(a,null,0,0,b,d);u.scrollTop=u.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";
-f.appendChild(n);this.saveBtnClickHandler=function(b,d,g,c){a.saveLibrary(b,d,g,c)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(q.value,g,h,k)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";f.appendChild(n);a.editor.cancelFirst||f.appendChild(c);b.appendChild(f);this.container=b},EditShapeDialog=function(a,c,b,f,h){f=null!=f?f:300;h=null!=h?h:120;var k,m,p=document.createElement("table"),t=document.createElement("tbody");
-p.style.cellPadding="4px";k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,b);k.appendChild(m);t.appendChild(k);k=document.createElement("tr");m=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=f-200+"px";d.style.height=h+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};m.appendChild(d);k.appendChild(m);m=document.createElement("td");
-b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=h+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);m.appendChild(b);var g=new Graph(b);g.setEnabled(!1);var n=a.editor.graph.cloneCell(c);g.addCells([n]);b=g.view.getState(n);var q="";null!=b.shape&&null!=b.shape.stencil&&(q=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(d,q||"");b=g.getGraphBounds();
-h=Math.min(160/b.width,(h-40)/b.height);g.view.scaleAndTranslate(h,20/h-b.x,20/h-b.y);k.appendChild(m);t.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&m.appendChild(h);a.isOffline()||(b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
+function(){null!=x&&(x(),x=null);B.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",f.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=x&&(x(),x=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,d){E=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var g=a.indexOf(",");0<g&&(a=a.substring(0,g)+";base64,"+a.substring(g+1))}t(a,null,0,0,b,d);u.scrollTop=u.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";
+f.appendChild(n);this.saveBtnClickHandler=function(b,d,g,c){a.saveLibrary(b,d,g,c)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(q.value,g,k,h)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";f.appendChild(n);a.editor.cancelFirst||f.appendChild(c);b.appendChild(f);this.container=b},EditShapeDialog=function(a,c,b,f,k){f=null!=f?f:300;k=null!=k?k:120;var h,m,t=document.createElement("table"),p=document.createElement("tbody");
+t.style.cellPadding="4px";h=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,b);h.appendChild(m);p.appendChild(h);h=document.createElement("tr");m=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=f-200+"px";d.style.height=k+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};m.appendChild(d);h.appendChild(m);m=document.createElement("td");
+b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=k+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);m.appendChild(b);var g=new Graph(b);g.setEnabled(!1);var n=a.editor.graph.cloneCell(c);g.addCells([n]);b=g.view.getState(n);var q="";null!=b.shape&&null!=b.shape.stencil&&(q=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(d,q||"");b=g.getGraphBounds();
+k=Math.min(160/b.width,(k-40)/b.height);g.view.scaleAndTranslate(k,20/k-b.x,20/k-b.y);h.appendChild(m);p.appendChild(h);h=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&m.appendChild(k);a.isOffline()||(b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
b.className="geBtn",m.appendChild(b));var u=function(b,g,c){var l=d.value,n=mxUtils.parseXml(l),l=mxUtils.getPrettyXml(n.documentElement),n=n.documentElement.getElementsByTagName("parsererror");if(null!=n&&0<n.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),n=!b.model.contains(g),!c||n||l!=q){l=a.editor.graph.compress(l);b.getModel().beginUpdate();try{if(n){var f=a.editor.graph.getInsertPoint();g.geometry.x=f.x;
-g.geometry.y=f.y;b.addCell(g)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+l+")",[g])}catch(E){throw E;}finally{b.getModel().endUpdate()}n&&b.setSelectionCell(g)}};b=mxUtils.button(mxResources.get("preview"),function(){u(g,n,!1)});b.className="geBtn";m.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";m.appendChild(b);a.editor.cancelFirst||m.appendChild(h);k.appendChild(m);t.appendChild(k);p.appendChild(t);this.container=
-p},CustomDialog=function(a,c,b,f,h,k,m,p){var t=document.createElement("div");t.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=m&&c.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});m.className="geBtn";p&&(m.style.display="none");a.editor.cancelFirst&&c.appendChild(m);a.isOffline()||null==k||(p=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),p.className="geBtn",c.appendChild(p));
-h=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(h);h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(m);t.appendChild(c);this.cancelBtn=m;this.okButton=h;this.container=t},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+
+g.geometry.y=f.y;b.addCell(g)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+l+")",[g])}catch(E){throw E;}finally{b.getModel().endUpdate()}n&&b.setSelectionCell(g)}};b=mxUtils.button(mxResources.get("preview"),function(){u(g,n,!1)});b.className="geBtn";m.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";m.appendChild(b);a.editor.cancelFirst||m.appendChild(k);h.appendChild(m);p.appendChild(h);t.appendChild(p);this.container=
+t},CustomDialog=function(a,c,b,f,k,h,m,t){var p=document.createElement("div");p.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=m&&c.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});m.className="geBtn";t&&(m.style.display="none");a.editor.cancelFirst&&c.appendChild(m);a.isOffline()||null==h||(t=mxUtils.button(mxResources.get("help"),function(){a.openLink(h)}),t.className="geBtn",c.appendChild(t));
+k=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(k);k.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(m);p.appendChild(c);this.cancelBtn=m;this.okButton=k;this.container=p},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+
mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates",null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showAll",null,"+ Show all")+
'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+mxResources.get("myDiagrams",null,"My diagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+
mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">&#x1F6C8; '+
mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",c=document.createElement("div");c.innerHTML=a;c.className="geTemplateDlg";
-var a=window.innerWidth,b=window.innerHeight,f=987,h=712;.9*a<f&&(f=Math.max(.9*a,600),c.style.width=f+"px");.9*b<h&&(h=Math.max(.9*b,300),c.style.height=h+"px");this.width=f;this.height=h;this.container=c};
-TemplatesDialog.prototype.init=function(a,c,b,f,h,k,m,p,t,d){function g(){null!=D&&(D.style.fontWeight="normal",D.style.textDecoration="none",D=null)}function n(a,b,d,g,c,l,n){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+g+"]").className="geTempDlgRadioBtn "+(n?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+b).src="/images/"+d+"-sel.svg";C.querySelector("."+c).src="/images/"+
+var a=window.innerWidth,b=window.innerHeight,f=987,k=712;.9*a<f&&(f=Math.max(.9*a,600),c.style.width=f+"px");.9*b<k&&(k=Math.max(.9*b,300),c.style.height=k+"px");this.width=f;this.height=k;this.container=c};
+TemplatesDialog.prototype.init=function(a,c,b,f,k,h,m,t,p,d){function g(){null!=D&&(D.style.fontWeight="normal",D.style.textDecoration="none",D=null)}function n(a,b,d,g,c,l,n){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+g+"]").className="geTempDlgRadioBtn "+(n?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+b).src="/images/"+d+"-sel.svg";C.querySelector("."+c).src="/images/"+
l+".svg";return!0}function q(a){function b(a){Z.removeChild(g);C.removeChild(d);Z.scrollTop=l}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var d=document.createElement("div");d.className="geTempDlgDialogMask";C.appendChild(d);var g=document.createElement("div");g.className="geTempDlgDiagramPreviewBox";var c=document.createElement("img");c.src=a;g.appendChild(c);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
a.setAttribute("title",mxResources.get("close"));g.appendChild(a);var l=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(d,"click",b);Z.appendChild(g);Z.scrollTop=0;g.style.lineHeight=g.clientHeight+"px"}function u(a,b,d){if(null!=F){for(var g=F.className.split(" "),c=0;c<g.length;c++)if(-1<g[c].indexOf("Active")){g.splice(c,1);break}F.className=g.join(" ")}null!=a?(F=a,F.className+=" "+b,I=d,N.className="geTempDlgCreateBtn"):(I=F=null,N.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function v(b){if(null!=I){var g=I;I=null;N.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";g.isExternal?(1==b?d(g.url,g,"nameInput.value"):t(g.url,g,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+g.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function w(a){a=a?"":"none";for(var b=C.querySelectorAll(".geTempDlgLinkToDiagram"),d=0;d<b.length;d++)b[d].style.display=
+function v(b){if(null!=I){var g=I;I=null;N.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";g.isExternal?(1==b?d(g.url,g,"nameInput.value"):p(g.url,g,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+g.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function w(a){a=a?"":"none";for(var b=C.querySelectorAll(".geTempDlgLinkToDiagram"),d=0;d<b.length;d++)b[d].style.display=
a}function y(a,b,d){function g(){N.innerHTML=b?mxResources.get("create"):mxResources.get("copy");w(!b)}R.innerHTML="";u();M=a;var c=null;if(d){c=document.createElement("table");c.className="geTempDlgDiagramsListGrid";var l=document.createElement("tr"),n=document.createElement("th");n.style.width="50%";n.innerHTML=mxResources.get("diagram",null,"Diagram");l.appendChild(n);n=document.createElement("th");n.style.width="25%";n.innerHTML=mxResources.get("changedBy",null,"Changed By");l.appendChild(n);
-n=document.createElement("th");n.style.width="25%";n.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");l.appendChild(n);c.appendChild(l);R.appendChild(c)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var f=a[l].url,n=mxUtils.htmlEntities(a[l].title),z=a[l].tooltip||a[l].title,h=a[l].imgUrl,x=mxUtils.htmlEntities(a[l].changedBy||""),k=mxUtils.htmlEntities(a[l].lastModifiedOn||"");h||(h=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=d?50:15;null!=n&&n.length>f&&(n=n.substring(0,
-f)+"&hellip;");if(d){var E=document.createElement("tr"),h=document.createElement("td"),m=document.createElement("img");m.src="/images/icon-search.svg";m.className="geTempDlgDiagramListPreviewBtn";m.setAttribute("title",mxResources.get("preview"));h.appendChild(m);z=document.createElement("span");z.className="geTempDlgDiagramTitle";z.innerHTML=n;h.appendChild(z);E.appendChild(h);h=document.createElement("td");h.innerHTML=x;E.appendChild(h);h=document.createElement("td");h.innerHTML=k;E.appendChild(h);
-c.appendChild(E);null==F&&(g(),u(E,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(E,"click",function(){F!=b&&(g(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(E,"dblclick",v);mxEvent.addListener(m,"click",function(){q(a)})})(a[l],E)}else{var C=document.createElement("div");C.className="geTempDlgDiagramTile";C.setAttribute("title",z);null==F&&(g(),u(C,"geTempDlgDiagramTileActive",a[l]));x=document.createElement("div");x.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
-var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,x);y.src=h;x.appendChild(y);C.appendChild(x);x=document.createElement("div");x.className="geTempDlgDiagramTileLbl";x.innerHTML=null!=n?n:"";C.appendChild(x);m=document.createElement("img");m.src="/images/icon-search.svg";m.className="geTempDlgDiagramPreviewBtn";
+n=document.createElement("th");n.style.width="25%";n.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");l.appendChild(n);c.appendChild(l);R.appendChild(c)}for(l=0;l<a.length;l++){a[l].isExternal=!b;var f=a[l].url,n=mxUtils.htmlEntities(a[l].title),z=a[l].tooltip||a[l].title,h=a[l].imgUrl,k=mxUtils.htmlEntities(a[l].changedBy||""),x=mxUtils.htmlEntities(a[l].lastModifiedOn||"");h||(h=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=d?50:15;null!=n&&n.length>f&&(n=n.substring(0,
+f)+"&hellip;");if(d){var E=document.createElement("tr"),h=document.createElement("td"),m=document.createElement("img");m.src="/images/icon-search.svg";m.className="geTempDlgDiagramListPreviewBtn";m.setAttribute("title",mxResources.get("preview"));h.appendChild(m);z=document.createElement("span");z.className="geTempDlgDiagramTitle";z.innerHTML=n;h.appendChild(z);E.appendChild(h);h=document.createElement("td");h.innerHTML=k;E.appendChild(h);h=document.createElement("td");h.innerHTML=x;E.appendChild(h);
+c.appendChild(E);null==F&&(g(),u(E,"geTempDlgDiagramsListGridActive",a[l]));(function(a,b){mxEvent.addListener(E,"click",function(){F!=b&&(g(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(E,"dblclick",v);mxEvent.addListener(m,"click",function(){q(a)})})(a[l],E)}else{var C=document.createElement("div");C.className="geTempDlgDiagramTile";C.setAttribute("title",z);null==F&&(g(),u(C,"geTempDlgDiagramTileActive",a[l]));k=document.createElement("div");k.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
+var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,k);y.src=h;k.appendChild(y);C.appendChild(k);k=document.createElement("div");k.className="geTempDlgDiagramTileLbl";k.innerHTML=null!=n?n:"";C.appendChild(k);m=document.createElement("img");m.src="/images/icon-search.svg";m.className="geTempDlgDiagramPreviewBtn";
m.setAttribute("title",mxResources.get("preview"));C.appendChild(m);(function(a,b){mxEvent.addListener(C,"click",function(){F!=b&&(g(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(C,"dblclick",v);mxEvent.addListener(m,"click",function(){q(a)})})(a[l],C);R.appendChild(C)}}}function l(a,b){Q.innerHTML="";u();for(var d=!b&&5<a.length?5:a.length,g=0;g<d;g++){var c=a[g];c.isCategory=!0;var l=document.createElement("div"),n=mxResources.get(c.title);null==n&&(n=c.title.substring(0,1).toUpperCase()+
c.title.substring(1));l.className="geTempDlgNewDiagramCatItem";l.setAttribute("title",n);n=mxUtils.htmlEntities(n);15<n.length&&(n=n.substring(0,15)+"&hellip;");null==F&&(N.innerHTML=mxResources.get("create"),w(),u(l,"geTempDlgNewDiagramCatItemActive",c));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var q=document.createElement("img");q.src=NEW_DIAGRAM_CATS_PATH+"/"+c.img;f.appendChild(q);l.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";
f.innerHTML=n;l.appendChild(f);Q.appendChild(l);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(N.innerHTML=mxResources.get("create"),w(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(l,"dblclick",v)})(c,l)}T.style.display=5>a.length?"none":""}function x(a){var b=C.querySelector(".geTemplatesList"),d;for(d in a){var g=document.createElement("div"),c=mxResources.get(d),l=a[d];null==c&&(c=d.substring(0,1).toUpperCase()+d.substring(1));g.className="geTemplateCatLink";
g.setAttribute("title",c+" ("+l.length+")");c=mxUtils.htmlEntities(c);15<c.length&&(c=c.substring(0,15)+"&hellip;");g.innerHTML=c+" ("+l.length+")";b.appendChild(g);(function(b,d,c){mxEvent.addListener(g,"click",function(){D!=c&&(null!=D?(D.style.fontWeight="normal",D.style.textDecoration="none"):(O.style.display="none",aa.style.minHeight="100%"),D=c,D.style.fontWeight="bold",D.style.textDecoration="underline",Z.scrollTop=0,B&&(H=!0),V.innerHTML=d,Y.style.display="none",y(a[b],!0))})})(d,c,g)}}function z(a){m&&
-(Z.scrollTop=0,R.innerHTML="",X.spin(R),H=!1,B=!0,V.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),L=null,m(da,a?null:k))}function E(a){g();Z.scrollTop=0;R.innerHTML="";X.spin(R);H=!1;B=!0;W=null;V.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';p(a,da,G?null:k);L=a}f=null!=f?f:TEMPLATE_PATH+"/index.xml";h=null!=h?h:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,B=!1,H=!1,D=null,F=null,I=null,A=!1,G=!0,J=!1,M=[],L,T=C.querySelector(".geTempDlgShowAllBtn"),
+(Z.scrollTop=0,R.innerHTML="",X.spin(R),H=!1,B=!0,V.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),L=null,m(da,a?null:h))}function E(a){g();Z.scrollTop=0;R.innerHTML="";X.spin(R);H=!1;B=!0;W=null;V.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';t(a,da,G?null:h);L=a}f=null!=f?f:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,B=!1,H=!1,D=null,F=null,I=null,A=!1,G=!0,J=!1,M=[],L,T=C.querySelector(".geTempDlgShowAllBtn"),
R=C.querySelector(".geTempDlgDiagramsTiles"),V=C.querySelector(".geTempDlgDiagramsListTitle"),Y=C.querySelector(".geTempDlgDiagramsListBtns"),Z=C.querySelector(".geTempDlgContent"),aa=C.querySelector(".geTempDlgDiagramsList"),O=C.querySelector(".geTempDlgNewDiagramCat"),Q=C.querySelector(".geTempDlgNewDiagramCatList"),N=C.querySelector(".geTempDlgCreateBtn"),X=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(C.querySelector(".geTempDlgNewDiagramlbl"),
"click",function(){g();O.style.display="";aa.style.minHeight="calc(100% - 280px)";z(G)});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){n(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(G=!0,null==L?z(G):E(L))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){n(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
"all-diagrams",!0)&&(G=!1,null==L?z(G):E(L))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){n(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(J=!0,y(M,!1,J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){n(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(J=!1,y(M,!1,J))});mxEvent.addListener(T,"click",function(){A?(O.style.height="280px",
Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),l(ba)):(O.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),l(ba,!0));A=!A});var P=!1,U=!1,S={},ba=[],K=1;mxUtils.get(f,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=b.indexOf("/"),b=b.substring(0,d),d=S[b];null==d&&(K++,d=[],S[b]=d);d.push({url:a.getAttribute("url"),
-libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}x(S)}});mxUtils.get(h,function(a){if(!U){U=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ba.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;l(ba)}});var da=function(a,b){Y.style.display="";X.stop();B=!1;H?H=!1:b?R.innerHTML=
-b:0==a.length?R.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,J)};z(G);var W=null;p&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=W&&clearTimeout(W);13==a.keyCode?E(b.value):W=setTimeout(function(){E(b.value)},500)});mxEvent.addListener(N,"click",v);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
-b&&b();a.hideDialog(!0)})};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
+libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}x(S)}});mxUtils.get(k,function(a){if(!U){U=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ba.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;l(ba)}});var da=function(a,b){Y.style.display="";X.stop();B=!1;H?H=!1:b?R.innerHTML=
+b:0==a.length?R.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,J)};z(G);var W=null;t&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=W&&clearTimeout(W);13==a.keyCode?E(b.value):W=setTimeout(function(){E(b.value)},500)});mxEvent.addListener(N,"click",v);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
+b&&b();a.hideDialog(!0)})};
+var BtnDialog=function(a,c,b,f){var k=document.createElement("div");k.style.textAlign="center";var h=document.createElement("p");h.style.fontSize="16pt";h.style.padding="0px";h.style.margin="0px";h.style.color="gray";mxUtils.write(h,mxResources.get("done"));var m="Unknown",t=document.createElement("img");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.marginRight="10px";c==a.drive?(m=mxResources.get("googleDrive"),t.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?
+(m=mxResources.get("dropbox"),t.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive?(m=mxResources.get("oneDrive"),t.src=IMAGE_PATH+"/onedrive-logo-white.svg"):c==a.gitHub?(m=mxResources.get("github"),t.src=IMAGE_PATH+"/github-logo-white.svg"):c==a.trello&&(m=mxResources.get("trello"),t.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[m],"You are now authorized in {1}"));b=mxUtils.button(b,f);b.insertBefore(t,b.firstChild);
+b.style.marginTop="6px";b.className="geBigButton";k.appendChild(h);k.appendChild(a);k.appendChild(b);this.container=k};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
IMAGE_PATH+"/spin.gif";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
@@ -7782,10 +7806,10 @@ function(){f.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.
a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});
MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var d=Editor.prototype.init;Editor.prototype.init=function(){d.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
b){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var g=document.getElementsByTagName("script");if(null!=g&&0<g.length){var c=document.createElement("script");c.type="text/javascript";c.src=a;g[0].parentNode.appendChild(c)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
-var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,d,g,c){void 0!==d?b.push(d.replace(/\\'/g,"'")):void 0!==g?b.push(g.replace(/\\"/g,'"')):void 0!==c&&b.push(c);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var d=null;null!=a.editor.graph.getModel().getParent(b)?d=b.getId():null!=a.currentPage&&(d=a.currentPage.getId());return d});if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
-this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var t=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
-function(a){a=t.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,d=b.editor.graph,g=this.createOption(mxResources.get("shadow"),function(){return d.shadowVisible},function(a){var g=new ChangePageSetup(b);g.ignoreColor=!0;g.ignoreImage=!0;g.shadowVisible=a;d.model.execute(g)},{install:function(a){this.listener=function(){a(d.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});
+var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,d,g,c){void 0!==d?b.push(d.replace(/\\'/g,"'")):void 0!==g?b.push(g.replace(/\\"/g,'"')):void 0!==c&&b.push(c);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
+var h=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,b){var d=null;null!=a.editor.graph.getModel().getParent(b)?d=b.getId():null!=a.currentPage&&(d=a.currentPage.getId());return d});if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
+this.update)};var t=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?t.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
+function(a){a=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,d=b.editor.graph,g=this.createOption(mxResources.get("shadow"),function(){return d.shadowVisible},function(a){var g=new ChangePageSetup(b);g.ignoreColor=!0;g.ignoreImage=!0;g.shadowVisible=a;d.model.execute(g)},{install:function(a){this.listener=function(){a(d.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});
Editor.shadowOptionEnabled||(g.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(g,60));a.appendChild(g)}return a};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi,g=b.editor.graph;if(g.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},
{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}if(this.isMathOptionVisible()&&g.isEnabled()&&"undefined"!==typeof MathJax){c=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return g.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(g.mathEnabled)};b.addListener("mathEnabledChanged",
this.listener)},destroy:function(){b.removeListener(this.listener)}});c.style.paddingTop="5px";a.appendChild(c);var l=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";c.appendChild(l)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
@@ -7813,21 +7837,21 @@ stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleForm
c.shape.customProperties||[],c.cell.vertex?Array.prototype.push.apply(c.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(c.shape.customProperties,Editor.commonEdgeProperties)),g(c.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{g(JSON.parse(a))}catch(D){}}};var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
g.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},d=a.vertices,c=a.edges,l=0;l<d.length;l++)this.findCommonProperties(d[l],b,0==l);for(l=0;l<c.length;l++)this.findCommonProperties(c[l],b,0==d.length&&0==l);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var n=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");
-b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return n.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,d){function g(a,b,d,g){w.getModel().beginUpdate();try{var c=[],l=[];if(null!=d.index){for(var n=[],f=d.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)n.push(f.getAttribute("data-pValue")),f=f.nextSibling;d.index<n.length?null!=g?n.splice(g,1):n[d.index]=b:n.push(b);null!=d.size&&n.length>
-d.size&&(n=n.slice(0,d.size));b=n.join(",");null!=d.countProperty&&(w.setCellStyles(d.countProperty,n.length,w.getSelectionCells()),c.push(d.countProperty),l.push(n.length))}w.setCellStyles(a,b,w.getSelectionCells());c.push(a);l.push(b);if(null!=d.dependentProps)for(a=0;a<d.dependentProps.length;a++){var q=d.dependentPropsDefVal[a],u=d.dependentPropsVals[a];if(u.length>b)u=u.slice(0,b);else for(var k=u.length;k<b;k++)u.push(q);u=u.join(",");w.setCellStyles(d.dependentProps[a],u,w.getSelectionCells());
-c.push(d.dependentProps[a]);l.push(u)}h.editorUi.fireEvent(new mxEventObject("styleChanged","keys",c,"values",l,"cells",w.getSelectionCells()))}finally{w.getModel().endUpdate()}}function c(b,d,g){var c=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);d.style.position="absolute";d.style.left=l.x-c.x+"px";d.style.top=l.y-c.y+"px";d.style.width=b.offsetWidth+"px";d.style.height=b.offsetHeight-(g?4:0)+"px";d.style.zIndex=5}function l(a,b,d){var c=document.createElement("div");c.style.width="32px";c.style.height=
-"4px";c.style.margin="2px";c.style.border="1px solid black";c.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(h,function(l){this.editorUi.pickColor(b,function(b){c.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;g(a,b,d)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(c);return btn}function n(a,b,d,c,l,n,f){null!=b&&(b=b.split(","),x.push({name:a,
-values:b,type:d,defVal:c,countProperty:l,parentRow:n,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(h,function(b){for(var q=n,h=0;null!=q.nextSibling;)if(q.nextSibling.getAttribute("data-pName")==a)q=q.nextSibling,h++;else break;var w={type:d,parentRow:n,index:h,isDeletable:!0,defVal:c,countProperty:l},h=u(a,"",w,0==h%2,f);g(a,c,w);q.parentNode.insertBefore(h,q.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function f(a,b,d,g,c,l,n){if(0<c){var f=Array(c);b=null!=b?b.split(","):[];for(var q=0;q<c;q++)f[q]=null!=b[q]?b[q]:null!=g?g:"";x.push({name:a,values:f,type:d,defVal:g,parentRow:l,flipBkg:n,size:c})}return document.createElement("div")}function q(a,b,d){var c=document.createElement("input");c.type="checkbox";c.checked="1"==b;mxEvent.addListener(c,"change",function(){g(a,c.checked?"1":"0",d)});return c}function u(b,d,u,w,k){var x=u.dispName,v=u.type,m=document.createElement("tr");m.className="gePropRow"+
-(k?"Dark":"")+(w?"Alt":"")+" gePropNonHeaderRow";m.setAttribute("data-pName",b);m.setAttribute("data-pValue",d);w=!1;null!=u.index&&(m.setAttribute("data-index",u.index),x=(null!=x?x:"")+"["+u.index+"]",w=!0);var z=document.createElement("td");z.className="gePropRowCell";z.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));w&&(z.style.textAlign="right");m.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==v)z.appendChild(l(b,d,u));else if("bool"==v||"boolean"==
-v)z.appendChild(q(b,d,u));else if("enum"==v){var E=u.enumList;for(k=0;k<E.length;k++)if(x=E[k],x.val==d){z.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(z,"click",mxUtils.bind(h,function(){var l=document.createElement("select");c(z,l);for(var n=0;n<E.length;n++){var f=E[n],q=document.createElement("option");q.value=mxUtils.htmlEntities(f.val);q.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));l.appendChild(q)}l.value=
-d;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);g(b,a,u)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==v?z.appendChild(n(b,d,u.subType,u.subDefVal,u.countProperty,m,k)):"staticArr"==v?z.appendChild(f(b,d,u.subType,u.subDefVal,u.size,m,k)):(z.innerHTML=d,mxEvent.addListener(z,"click",mxUtils.bind(h,function(){function l(){var a=n.value,a=0==a.length&&"string"!=v?0:a;u.allowAuto&&("auto"==a.trim().toLowerCase()?
+b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return n.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,d){function g(a,b,d,g){h.getModel().beginUpdate();try{var c=[],l=[];if(null!=d.index){for(var n=[],f=d.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)n.push(f.getAttribute("data-pValue")),f=f.nextSibling;d.index<n.length?null!=g?n.splice(g,1):n[d.index]=b:n.push(b);null!=d.size&&n.length>
+d.size&&(n=n.slice(0,d.size));b=n.join(",");null!=d.countProperty&&(h.setCellStyles(d.countProperty,n.length,h.getSelectionCells()),c.push(d.countProperty),l.push(n.length))}h.setCellStyles(a,b,h.getSelectionCells());c.push(a);l.push(b);if(null!=d.dependentProps)for(a=0;a<d.dependentProps.length;a++){var q=d.dependentPropsDefVal[a],u=d.dependentPropsVals[a];if(u.length>b)u=u.slice(0,b);else for(var k=u.length;k<b;k++)u.push(q);u=u.join(",");h.setCellStyles(d.dependentProps[a],u,h.getSelectionCells());
+c.push(d.dependentProps[a]);l.push(u)}w.editorUi.fireEvent(new mxEventObject("styleChanged","keys",c,"values",l,"cells",h.getSelectionCells()))}finally{h.getModel().endUpdate()}}function c(b,d,g){var c=mxUtils.getOffset(a,!0),l=mxUtils.getOffset(b,!0);d.style.position="absolute";d.style.left=l.x-c.x+"px";d.style.top=l.y-c.y+"px";d.style.width=b.offsetWidth+"px";d.style.height=b.offsetHeight-(g?4:0)+"px";d.style.zIndex=5}function l(a,b,d){var c=document.createElement("div");c.style.width="32px";c.style.height=
+"4px";c.style.margin="2px";c.style.border="1px solid black";c.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(w,function(l){this.editorUi.pickColor(b,function(b){c.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;g(a,b,d)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(c);return btn}function n(a,b,d,c,l,n,f){null!=b&&(b=b.split(","),k.push({name:a,
+values:b,type:d,defVal:c,countProperty:l,parentRow:n,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(w,function(b){for(var q=n,w=0;null!=q.nextSibling;)if(q.nextSibling.getAttribute("data-pName")==a)q=q.nextSibling,w++;else break;var h={type:d,parentRow:n,index:w,isDeletable:!0,defVal:c,countProperty:l},w=u(a,"",h,0==w%2,f);g(a,c,h);q.parentNode.insertBefore(w,q.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function f(a,b,d,g,c,l,n){if(0<c){var f=Array(c);b=null!=b?b.split(","):[];for(var q=0;q<c;q++)f[q]=null!=b[q]?b[q]:null!=g?g:"";k.push({name:a,values:f,type:d,defVal:g,parentRow:l,flipBkg:n,size:c})}return document.createElement("div")}function q(a,b,d){var c=document.createElement("input");c.type="checkbox";c.checked="1"==b;mxEvent.addListener(c,"change",function(){g(a,c.checked?"1":"0",d)});return c}function u(b,d,u,h,k){var x=u.dispName,v=u.type,m=document.createElement("tr");m.className="gePropRow"+
+(k?"Dark":"")+(h?"Alt":"")+" gePropNonHeaderRow";m.setAttribute("data-pName",b);m.setAttribute("data-pValue",d);h=!1;null!=u.index&&(m.setAttribute("data-index",u.index),x=(null!=x?x:"")+"["+u.index+"]",h=!0);var z=document.createElement("td");z.className="gePropRowCell";z.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));h&&(z.style.textAlign="right");m.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==v)z.appendChild(l(b,d,u));else if("bool"==v||"boolean"==
+v)z.appendChild(q(b,d,u));else if("enum"==v){var E=u.enumList;for(k=0;k<E.length;k++)if(x=E[k],x.val==d){z.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(z,"click",mxUtils.bind(w,function(){var l=document.createElement("select");c(z,l);for(var n=0;n<E.length;n++){var f=E[n],q=document.createElement("option");q.value=mxUtils.htmlEntities(f.val);q.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));l.appendChild(q)}l.value=
+d;a.appendChild(l);mxEvent.addListener(l,"change",function(){var a=mxUtils.htmlEntities(l.value);g(b,a,u)});l.focus();mxEvent.addListener(l,"blur",function(){a.removeChild(l)})}))}else"dynamicArr"==v?z.appendChild(n(b,d,u.subType,u.subDefVal,u.countProperty,m,k)):"staticArr"==v?z.appendChild(f(b,d,u.subType,u.subDefVal,u.size,m,k)):(z.innerHTML=d,mxEvent.addListener(z,"click",mxUtils.bind(w,function(){function l(){var a=n.value,a=0==a.length&&"string"!=v?0:a;u.allowAuto&&("auto"==a.trim().toLowerCase()?
(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=u.min&&a<u.min?a=u.min:null!=u.max&&a>u.max&&(a=u.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");g(b,a,u)}var n=document.createElement("input");c(z,n,!0);n.value=d;n.className="gePropEditor";"int"!=v&&"float"!=v||u.allowAuto||(n.type="number",n.step="int"==v?"1":"any",null!=u.min&&(n.min=parseFloat(u.min)),null!=u.max&&(n.max=parseFloat(u.max)));a.appendChild(n);mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&l()});
-n.focus();mxEvent.addListener(n,"blur",function(){l()})})));u.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(h,function(a){g(b,"",u,u.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",z.appendChild(k));m.appendChild(z);return m}var h=this,w=this.editorUi.editor.graph,x=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var k=document.createElement("tr");
-k.className="gePropHeader";var m=document.createElement("th");m.className="gePropHeaderCell";var z=document.createElement("img");z.src=Sidebar.prototype.expandedImage;m.appendChild(z);mxUtils.write(m,mxResources.get("property"));k.style.cursor="pointer";var E=function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),d;if(h.editorUi.propertiesCollapsed){z.src=Sidebar.prototype.collapsedImage;d="none";for(var g=a.childNodes.length-1;0<=g;g--)try{var c=a.childNodes[g],l=c.nodeName.toUpperCase();"INPUT"!=
-l&&"SELECT"!=l||a.removeChild(c)}catch(ga){}}else z.src=Sidebar.prototype.expandedImage,d="";for(g=0;g<b.length;g++)b[g].style.display=d};mxEvent.addListener(k,"click",function(){h.editorUi.propertiesCollapsed=!h.editorUi.propertiesCollapsed;E()});k.appendChild(m);m=document.createElement("th");m.className="gePropHeaderCell";m.innerHTML=mxResources.get("value");k.appendChild(m);v.appendChild(k);var y=!1,C=!1,t;for(t in b)if(k=b[t],"function"!=typeof k.isVisible||k.isVisible(d)){var p=null!=d.style[t]?
-mxUtils.htmlEntities(d.style[t]+""):k.defVal;if("separator"==k.type)C=!C;else{if("staticArr"==k.type)k.size=parseInt(d.style[k.sizeProperty]||b[k.sizeProperty].defVal)||0;else if(null!=k.dependentProps){for(var X=k.dependentProps,P=[],U=[],m=0;m<X.length;m++){var S=d.style[X[m]];U.push(b[X[m]].subDefVal);P.push(null!=S?S.split(","):[])}k.dependentPropsDefVal=U;k.dependentPropsVals=P}v.appendChild(u(t,p,k,y,C));y=!y}}for(m=0;m<x.length;m++)for(k=x[m],b=k.parentRow,d=0;d<k.values.length;d++)t=u(k.name,
-k.values[d],{type:k.type,parentRow:k.parentRow,isDeletable:k.isDeletable,index:d,defVal:k.defVal,countProperty:k.countProperty,size:k.size},0==d%2,k.flipBkg),b.parentNode.insertBefore(t,b.nextSibling),b=t;a.appendChild(v);E();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){g.getModel().beginUpdate();try{var d=g.getSelectionCells();for(b=0;b<d.length;b++){for(var c=g.getModel().getStyle(d[b]),n=0;n<l.length;n++)c=mxUtils.removeStylename(c,
+n.focus();mxEvent.addListener(n,"blur",function(){l()})})));u.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(w,function(a){g(b,"",u,u.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",z.appendChild(k));m.appendChild(z);return m}var w=this,h=this.editorUi.editor.graph,k=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");
+x.className="gePropHeader";var m=document.createElement("th");m.className="gePropHeaderCell";var z=document.createElement("img");z.src=Sidebar.prototype.expandedImage;m.appendChild(z);mxUtils.write(m,mxResources.get("property"));x.style.cursor="pointer";var E=function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),d;if(w.editorUi.propertiesCollapsed){z.src=Sidebar.prototype.collapsedImage;d="none";for(var g=a.childNodes.length-1;0<=g;g--)try{var c=a.childNodes[g],l=c.nodeName.toUpperCase();"INPUT"!=
+l&&"SELECT"!=l||a.removeChild(c)}catch(ga){}}else z.src=Sidebar.prototype.expandedImage,d="";for(g=0;g<b.length;g++)b[g].style.display=d};mxEvent.addListener(x,"click",function(){w.editorUi.propertiesCollapsed=!w.editorUi.propertiesCollapsed;E()});x.appendChild(m);m=document.createElement("th");m.className="gePropHeaderCell";m.innerHTML=mxResources.get("value");x.appendChild(m);v.appendChild(x);var y=!1,C=!1,t;for(t in b)if(x=b[t],"function"!=typeof x.isVisible||x.isVisible(d)){var p=null!=d.style[t]?
+mxUtils.htmlEntities(d.style[t]+""):x.defVal;if("separator"==x.type)C=!C;else{if("staticArr"==x.type)x.size=parseInt(d.style[x.sizeProperty]||b[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var X=x.dependentProps,P=[],U=[],m=0;m<X.length;m++){var S=d.style[X[m]];U.push(b[X[m]].subDefVal);P.push(null!=S?S.split(","):[])}x.dependentPropsDefVal=U;x.dependentPropsVals=P}v.appendChild(u(t,p,x,y,C));y=!y}}for(m=0;m<k.length;m++)for(x=k[m],b=x.parentRow,d=0;d<x.values.length;d++)t=u(x.name,
+x.values[d],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:d,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==d%2,x.flipBkg),b.parentNode.insertBefore(t,b.nextSibling),b=t;a.appendChild(v);E();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){g.getModel().beginUpdate();try{var d=g.getSelectionCells();for(b=0;b<d.length;b++){for(var c=g.getModel().getStyle(d[b]),n=0;n<l.length;n++)c=mxUtils.removeStylename(c,
l[n]);var f=g.getModel().isVertex(d[b])?g.defaultVertexStyle:g.defaultEdgeStyle;null!=a?(c=mxUtils.setStyle(c,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,null)),c=mxUtils.setStyle(c,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,null)),c=mxUtils.setStyle(c,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),g.getModel().isVertex(d[b])&&(c=mxUtils.setStyle(c,mxConstants.STYLE_FONTCOLOR,
a.font||mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null)))):(c=mxUtils.setStyle(c,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,"#ffffff")),c=mxUtils.setStyle(c,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,"#000000")),c=mxUtils.setStyle(c,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),g.getModel().isVertex(d[b])&&(c=mxUtils.setStyle(c,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,
null))));g.getModel().setStyle(d[b],c)}}finally{g.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?
@@ -7865,29 +7889,29 @@ mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarku
mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];
mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",
STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,
-5)&&(b="mxgraph.sysml"));return b};var l=mxMarker.createMarker;mxMarker.createMarker=function(a,b,d,g,c,n,f,q,u,h){if(null!=d&&null==mxMarker.markers[d]){var w=this.getPackageForType(d);null!=w&&mxStencilRegistry.getStencil(w)}return l.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function d(){x.value=Math.max(1,Math.min(f,Math.max(parseInt(x.value),parseInt(k.value))));k.value=Math.max(1,Math.min(f,Math.min(parseInt(x.value),parseInt(k.value))))}function g(b){function d(b,d,c){var l=
+5)&&(b="mxgraph.sysml"));return b};var l=mxMarker.createMarker;mxMarker.createMarker=function(a,b,d,g,c,n,f,q,u,w){if(null!=d&&null==mxMarker.markers[d]){var h=this.getPackageForType(d);null!=h&&mxStencilRegistry.getStencil(h)}return l.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function d(){x.value=Math.max(1,Math.min(f,Math.max(parseInt(x.value),parseInt(k.value))));k.value=Math.max(1,Math.min(f,Math.min(parseInt(x.value),parseInt(k.value))))}function g(b){function d(b,d,c){var l=
b.getGraphBounds(),n=0,f=0,q=W.get(),u=1/b.pageScale,w=z.checked;if(w)var u=parseInt(K.value),h=parseInt(da.value),u=Math.min(q.height*h/(l.height/b.view.scale),q.width*u/(l.width/b.view.scale));else u=parseInt(y.value)/(100*b.pageScale),isNaN(u)&&(g=1/b.pageScale,y.value="100 %");q=mxRectangle.fromRectangle(q);q.width=Math.ceil(q.width*g);q.height=Math.ceil(q.height*g);u*=g;!w&&b.pageVisible?(l=b.getPageLayout(),n-=l.x*q.width,f-=l.y*q.height):w=!0;if(null==d){d=PrintDialog.createPrintPreview(b,
u,q,0,n,f,w);d.pageSelector=!1;d.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(d.title=b.getTitle());var k=d.writeHead;d.writeHead=function(b){k.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=d.renderPage;d.renderPage=function(a,b,d,g,c,l){var n=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var f=v.apply(this,
-arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:f.className="geDisableMathJax";return f}}d.open(null,null,c,!0)}else{q=b.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";d.backgroundColor=q;d.autoOrigin=w;d.appendGraph(b,u,n,f,c,!0)}return d}var g=parseInt(ea.value)/100;isNaN(g)&&(g=1,ea.value="100 %");var g=.75*g,l=k.value,n=x.value,f=!h.checked,u=null;f&&(f=l==q&&n==q);if(!f&&null!=a.pages&&a.pages.length){var w=0,f=a.pages.length-1;h.checked||
-(w=parseInt(l)-1,f=parseInt(n)-1);for(var v=w;v<=f;v++){var m=a.pages[v],l=m==a.currentPage?c:null;if(null==l){var l=a.createTemporaryGraph(c.getStylesheet()),n=!0,w=!1,t=null,E=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&(n=m.viewState.pageVisible,w=m.viewState.mathEnabled,t=m.viewState.background,E=m.viewState.backgroundImage);l.background=t;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=n;l.mathEnabled=w;var p=l.getGlobalVariable;
-l.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?v+1:p.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(m);l.model.setRoot(m.root)}u=d(l,u,v!=f);l!=c&&l.container.parentNode.removeChild(l.container)}}else u=d(c);u.mathEnabled&&(f=u.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln("showMathMenu: false,"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
+arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:f.className="geDisableMathJax";return f}}d.open(null,null,c,!0)}else{q=b.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";d.backgroundColor=q;d.autoOrigin=w;d.appendGraph(b,u,n,f,c,!0)}return d}var g=parseInt(ea.value)/100;isNaN(g)&&(g=1,ea.value="100 %");var g=.75*g,l=k.value,n=x.value,f=!w.checked,u=null;f&&(f=l==q&&n==q);if(!f&&null!=a.pages&&a.pages.length){var h=0,f=a.pages.length-1;w.checked||
+(h=parseInt(l)-1,f=parseInt(n)-1);for(var v=h;v<=f;v++){var m=a.pages[v],l=m==a.currentPage?c:null;if(null==l){var l=a.createTemporaryGraph(c.getStylesheet()),n=!0,h=!1,t=null,p=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&(n=m.viewState.pageVisible,h=m.viewState.mathEnabled,t=m.viewState.background,p=m.viewState.backgroundImage);l.background=t;l.backgroundImage=null!=p?new mxImage(p.src,p.width,p.height):null;l.pageVisible=n;l.mathEnabled=h;var E=l.getGlobalVariable;
+l.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?v+1:E.apply(this,arguments)};document.body.appendChild(l.container);a.updatePageRoot(m);l.model.setRoot(m.root)}u=d(l,u,v!=f);l!=c&&l.container.parentNode.removeChild(l.container)}}else u=d(c);u.mathEnabled&&(f=u.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln("showMathMenu: false,"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),f.writeln('"HTML-CSS": {'),f.writeln("imageFont: null"),f.writeln("},"),f.writeln("TeX: {"),f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),b&&(f.writeln("MathJax.Hub.Queue(function () {"),
f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),f.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));u.closeDocument();!u.mathEnabled&&b&&PrintDialog.printPreview(u)}var c=a.editor.graph,l=document.createElement("div"),n=document.createElement("h3");n.style.width="100%";n.style.textAlign="center";n.style.marginTop="0px";mxUtils.write(n,b||mxResources.get("print"));l.appendChild(n);var f=1,q=1,u=document.createElement("div");
-u.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","all");h.setAttribute("type","radio");h.setAttribute("name","pages-printdialog");u.appendChild(h);n=document.createElement("span");mxUtils.write(n,mxResources.get("printAllPages"));u.appendChild(n);mxUtils.br(u);var w=h.cloneNode(!0);h.setAttribute("checked","checked");w.setAttribute("value","range");
-u.appendChild(w);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+":");u.appendChild(n);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";u.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("to"));u.appendChild(n);var x=k.cloneNode(!0);u.appendChild(x);mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(x,
-"focus",function(){w.checked=!0});mxEvent.addListener(k,"change",d);mxEvent.addListener(x,"change",d);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(n=0;n<a.pages.length;n++)if(a.currentPage==a.pages[n]){q=n+1;k.value=q;x.value=q;break}k.setAttribute("max",f);x.setAttribute("max",f);1<f&&l.appendChild(u);var v=document.createElement("div");v.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type",
+u.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var w=document.createElement("input");w.style.cssText="margin-right:8px;margin-bottom:8px;";w.setAttribute("value","all");w.setAttribute("type","radio");w.setAttribute("name","pages-printdialog");u.appendChild(w);n=document.createElement("span");mxUtils.write(n,mxResources.get("printAllPages"));u.appendChild(n);mxUtils.br(u);var h=w.cloneNode(!0);w.setAttribute("checked","checked");h.setAttribute("value","range");
+u.appendChild(h);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+":");u.appendChild(n);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";u.appendChild(k);n=document.createElement("span");mxUtils.write(n,mxResources.get("to"));u.appendChild(n);var x=k.cloneNode(!0);u.appendChild(x);mxEvent.addListener(k,"focus",function(){h.checked=!0});mxEvent.addListener(x,
+"focus",function(){h.checked=!0});mxEvent.addListener(k,"change",d);mxEvent.addListener(x,"change",d);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(n=0;n<a.pages.length;n++)if(a.currentPage==a.pages[n]){q=n+1;k.value=q;x.value=q;break}k.setAttribute("max",f);x.setAttribute("max",f);1<f&&l.appendChild(u);var v=document.createElement("div");v.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type",
"radio");m.setAttribute("name","printZoom");v.appendChild(m);n=document.createElement("span");mxUtils.write(n,mxResources.get("adjustTo"));v.appendChild(n);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";v.appendChild(y);mxEvent.addListener(y,"focus",function(){m.checked=!0});l.appendChild(v);var u=u.cloneNode(!1),z=m.cloneNode(!0);z.setAttribute("value","fit");m.setAttribute("checked","checked");n=document.createElement("div");
-n.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";n.appendChild(z);u.appendChild(n);v=document.createElement("table");v.style.display="inline-block";var t=document.createElement("tbody"),E=document.createElement("tr"),p=E.cloneNode(!0),N=document.createElement("td"),X=N.cloneNode(!0),P=N.cloneNode(!0),U=N.cloneNode(!0),S=N.cloneNode(!0),ba=N.cloneNode(!0);N.style.textAlign="right";U.style.textAlign="right";mxUtils.write(N,mxResources.get("fitTo"));var K=document.createElement("input");
+n.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";n.appendChild(z);u.appendChild(n);v=document.createElement("table");v.style.display="inline-block";var t=document.createElement("tbody"),p=document.createElement("tr"),E=p.cloneNode(!0),N=document.createElement("td"),X=N.cloneNode(!0),P=N.cloneNode(!0),U=N.cloneNode(!0),S=N.cloneNode(!0),ba=N.cloneNode(!0);N.style.textAlign="right";U.style.textAlign="right";mxUtils.write(N,mxResources.get("fitTo"));var K=document.createElement("input");
K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";X.appendChild(K);n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsAcross"));P.appendChild(n);mxUtils.write(U,mxResources.get("fitToBy"));var da=K.cloneNode(!0);S.appendChild(da);mxEvent.addListener(K,"focus",function(){z.checked=!0});mxEvent.addListener(da,"focus",function(){z.checked=!0});n=document.createElement("span");mxUtils.write(n,
-mxResources.get("fitToSheetsDown"));ba.appendChild(n);E.appendChild(N);E.appendChild(X);E.appendChild(P);p.appendChild(U);p.appendChild(S);p.appendChild(ba);t.appendChild(E);t.appendChild(p);v.appendChild(t);u.appendChild(v);l.appendChild(u);u=document.createElement("div");n=document.createElement("div");n.style.fontWeight="bold";n.style.marginBottom="12px";mxUtils.write(n,mxResources.get("paperSize"));u.appendChild(n);n=document.createElement("div");n.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(n,
+mxResources.get("fitToSheetsDown"));ba.appendChild(n);p.appendChild(N);p.appendChild(X);p.appendChild(P);E.appendChild(U);E.appendChild(S);E.appendChild(ba);t.appendChild(p);t.appendChild(E);v.appendChild(t);u.appendChild(v);l.appendChild(u);u=document.createElement("div");n=document.createElement("div");n.style.fontWeight="bold";n.style.marginBottom="12px";mxUtils.write(n,mxResources.get("paperSize"));u.appendChild(n);n=document.createElement("div");n.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(n,
"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);u.appendChild(n);n=document.createElement("span");mxUtils.write(n,mxResources.get("pageScale"));u.appendChild(n);var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","100 %");ea.style.width="60px";u.appendChild(ea);l.appendChild(u);n=document.createElement("div");n.style.cssText="text-align:right;margin:48px 0 0 0;";u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
u.className="geBtn";a.editor.cancelFirst&&n.appendChild(u);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){c.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",n.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();g(!1)}),v.className="geBtn",n.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();g(!0)});v.className=
"geBtn gePrimaryBtn";n.appendChild(v);a.editor.cancelFirst||n.appendChild(u);l.appendChild(n);this.container=l};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=
this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(x.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
-var ErrorDialog=function(a,c,b,f,h,k,m,p,t,d,g){t=null!=t?t:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,c);q.setAttribute("title",c);n.appendChild(q)}c=
-document.createElement("div");c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=k&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=g&&g()}),d.className="geBtn",b.appendChild(d));var u=mxUtils.button(f,function(){t&&a.hideDialog();null!=h&&h()});u.className="geBtn";b.appendChild(u);
-null!=m&&(f=mxUtils.button(m,function(){t&&a.hideDialog();null!=p&&p()}),f.className="geBtn gePrimaryBtn",b.appendChild(f));this.init=function(){u.focus()};n.appendChild(b);this.container=n};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,f){f.ui=a.ui;return b};a.afterDecode=function(a,b,f){f.previousColor=f.color;f.previousImage=f.image;f.previousFormat=f.format;null!=f.foldingEnabled&&(f.foldingEnabled=!f.foldingEnabled);null!=f.mathEnabled&&(f.mathEnabled=!f.mathEnabled);null!=f.shadowVisible&&(f.shadowVisible=!f.shadowVisible);return f};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.0.43";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,f,u){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,f,u);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
+var ErrorDialog=function(a,c,b,f,k,h,m,t,p,d,g){p=null!=p?p:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,c);q.setAttribute("title",c);n.appendChild(q)}c=
+document.createElement("div");c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=h&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();h()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=g&&g()}),d.className="geBtn",b.appendChild(d));var u=mxUtils.button(f,function(){p&&a.hideDialog();null!=k&&k()});u.className="geBtn";b.appendChild(u);
+null!=m&&(f=mxUtils.button(m,function(){p&&a.hideDialog();null!=t&&t()}),f.className="geBtn gePrimaryBtn",b.appendChild(f));this.init=function(){u.focus()};n.appendChild(b);this.container=n};
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,f){f.ui=a.ui;return b};a.afterDecode=function(a,b,f){f.previousColor=f.color;f.previousImage=f.image;f.previousFormat=f.format;null!=f.foldingEnabled&&(f.foldingEnabled=!f.foldingEnabled);null!=f.mathEnabled&&(f.mathEnabled=!f.mathEnabled);null!=f.shadowVisible&&(f.shadowVisible=!f.shadowVisible);return f};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.1.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,f,u){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,f,u);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/log?severity="+d+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
":lnum:"+encodeURIComponent(c)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(n){}};EditorUi.sendReport=function(a,
b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(n){}};EditorUi.debug=function(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
@@ -7914,10 +7938,10 @@ c);mxUtils.setTextContent(this.pages[g].node,this.editor.graph.compressNode(c));
d.push(" "):d.push("?"):d.push(b?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var d=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=d.getAttribute("name")&&d.setAttribute("name",this.anonymizeString(d.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(d)}catch(v){a[EditorUi.DIFF_INSERT][b].data=v.message}if(null!=
a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.DIFF_UPDATE][c];null!=f.name&&(f.name=this.anonymizeString(f.name));null!=f.cells&&(b=mxUtils.bind(this,function(a){var b=f.cells[a];if(null!=b){for(var d in b)null!=b[d].value&&(b[d].value="["+b[d].value.length+"]"),null!=b[d].style&&(b[d].style="["+b[d].style.length+"]"),null!=b[d].geometry&&(b[d].geometry="["+b[d].geometry.length+"]"),0==Object.keys(b[d]).length&&delete b[d];0==Object.keys(b).length&&delete f.cells[a]}}),
b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var d=0;d<a.attributes.length;d++)"as"!=a.attributes[d].name&&a.setAttribute(a.attributes[d].name,this.anonymizeString(a.attributes[d].value,b));if(null!=a.childNodes)for(d=0;d<
-a.childNodes.length;d++)this.anonymizeAttributes(a.childNodes[d],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var d=a.getElementsByTagName("mxCell"),g=0;g<d.length;g++)null!=d[g].getAttribute("value")&&d[g].setAttribute("value","["+d[g].getAttribute("value").length+"]"),null!=d[g].getAttribute("style")&&d[g].setAttribute("style","["+d[g].getAttribute("style").length+"]"),null!=d[g].parentNode&&"root"!=d[g].parentNode.nodeName&&null!=d[g].parentNode.parentNode&&(d[g].setAttribute("id",d[g].parentNode.getAttribute("id")),
-d[g].parentNode.parentNode.replaceChild(d[g],d[g].parentNode));d=a.getElementsByTagName("mxGeometry");for(g=0;g<d.length;g++)this.anonymizeAttributes(d[g],b);return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,
-function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,f,u,h,k,m,l){u=null!=u?u:!0;k=null!=k?k:this.getXmlFileData(u,null!=h?h:!1);l=null!=l?l:this.getCurrentFile();h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&
-(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var d=h.getGlobalVariable,g=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(g.root)}a=this.createFileData(k,h,l,window.location.href,a,b,c,f,u,m);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return a};EditorUi.prototype.getHtml=function(a,b,c,f,u,h){h=null!=
+a.childNodes.length;d++)this.anonymizeAttributes(a.childNodes[d],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var d=a.getElementsByTagName("mxCell"),c=0;c<d.length;c++)null!=d[c].getAttribute("value")&&d[c].setAttribute("value","["+d[c].getAttribute("value").length+"]"),null!=d[c].getAttribute("style")&&d[c].setAttribute("style","["+d[c].getAttribute("style").length+"]"),null!=d[c].parentNode&&"root"!=d[c].parentNode.nodeName&&null!=d[c].parentNode.parentNode&&(d[c].setAttribute("id",d[c].parentNode.getAttribute("id")),
+d[c].parentNode.parentNode.replaceChild(d[c],d[c].parentNode));d=a.getElementsByTagName("mxGeometry");for(c=0;c<d.length;c++)this.anonymizeAttributes(d[c],b);return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,
+function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,f,u,h,w,k,l){u=null!=u?u:!0;w=null!=w?w:this.getXmlFileData(u,null!=h?h:!1);l=null!=l?l:this.getCurrentFile();h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&
+(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var d=h.getGlobalVariable,g=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(g.root)}a=this.createFileData(w,h,l,window.location.href,a,b,c,f,u,k);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);return a};EditorUi.prototype.getHtml=function(a,b,c,f,u,h){h=null!=
h?h:!0;var d=null,g="https://www.draw.io/js/embed-static.min.js";if(null!=b){var d=h?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),l=b.view.scale;h=Math.floor(d.x/l-b.view.translate.x);l=Math.floor(d.y/l-b.view.translate.y);d=b.background;null==u&&(b=this.getBasenames().join(";"),0<b.length&&(g="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",l)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit",
"0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=f&&a.setAttribute("edit",f));null!=u&&(u=u.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";f=this.editor.graph.compress(a);this.editor.graph.decompress(f)!=a&&(f=encodeURIComponent(a));return(null==u?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=u?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==
u?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=u?'<meta http-equiv="refresh" content="0;URL=\''+u+"'\"/>\n":"")+"</head>\n<body"+(null==u&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+f+"</div>\n</div>\n"+(null==u?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
@@ -7966,10 +7990,10 @@ p.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.g
"hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)",h.style.cursor="copy",p.panningManager.stop(),p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(h.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),
h.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(h,"mouseleave",mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",h.style.border="3px solid transparent",h.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility=
"visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(h,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";h.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"drop",mxUtils.bind(this,function(a){h.style.border="3px solid transparent";h.style.cursor="";null!=g&&(g.style.border=
-"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,l,n,q,k,u,w,x){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,q,k),d)],d[0].vertex=!0,F(d,new mxRectangle(0,0,q,k),a,mxEvent.isAltDown(a)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&
-0<b.length&&(g.parentNode.removeChild(g),g=null);else{var m=!1,v=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var l=mxUtils.parseXml(d);if("mxlibrary"==l.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(l.documentElement));f(n,h);b=b.concat(n);D(a);this.spinner.stop();m=!0}catch(K){}else if("mxfile"==l.documentElement.nodeName)try{for(var q=l.documentElement.getElementsByTagName("diagram"),l=0;l<q.length;l++){var n=mxUtils.getTextContent(q[l]),k=this.stringToCells(this.editor.graph.decompress(n)),
-u=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,u.width,u.height),a)}m=!0}catch(K){null!=window.console&&console.log("error in drop handler:",K)}}m||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=x&&null!=u&&(/(\.v(dx|sdx?))($|\?)/i.test(u)||/(\.vs(x|sx?))($|\?)/i.test(u))?this.importVisio(x,function(a){v(a,"text/xml")},null,u):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(d,u)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?v(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):v(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(h.style.border="3px solid transparent",
+"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,l,n,q,k,u,w,m){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,q,k),d)],d[0].vertex=!0,F(d,new mxRectangle(0,0,q,k),a,mxEvent.isAltDown(a)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&
+0<b.length&&(g.parentNode.removeChild(g),g=null);else{var x=!1,v=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var l=mxUtils.parseXml(d);if("mxlibrary"==l.documentElement.nodeName)try{var n=JSON.parse(mxUtils.getTextContent(l.documentElement));f(n,h);b=b.concat(n);D(a);this.spinner.stop();x=!0}catch(K){}else if("mxfile"==l.documentElement.nodeName)try{for(var q=l.documentElement.getElementsByTagName("diagram"),l=0;l<q.length;l++){var n=mxUtils.getTextContent(q[l]),k=this.stringToCells(this.editor.graph.decompress(n)),
+u=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,u.width,u.height),a)}x=!0}catch(K){null!=window.console&&console.log("error in drop handler:",K)}}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=m&&null!=u&&(/(\.v(dx|sdx?))($|\?)/i.test(u)||/(\.vs(x|sx?))($|\?)/i.test(u))?this.importVisio(m,function(a){v(a,"text/xml")},null,u):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(d,u)&&null!=m?this.parseFile(m,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?v(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):v(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(h.style.border="3px solid transparent",
h.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,k.firstChild);mxEvent.addListener(m,"click",H);mxEvent.addListener(h,"dblclick",function(a){mxEvent.getSource(a)==h&&H(a)});c=m.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));k.insertBefore(c,k.firstChild);mxEvent.addListener(c,"click",I);this.isOffline()||".scratchpad"!=
a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),k.insertBefore(c,k.firstChild))}l.appendChild(k);l.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=
0;d<a.length;d++){var c=a[d],g=c.data;if(null!=g){var g=this.convertDataUri(g),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+g,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(g=this.stringToCells(this.editor.graph.decompress(c.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
@@ -7990,7 +8014,7 @@ function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function
!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var d=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,f,h){if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,
b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else{var d=document.createElement("a"),g=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var n=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),g=65==(n?parseInt(n[2],10):!1)?!1:g;if(g||this.isOffline()){d.href=URL.createObjectURL(f?this.base64ToBlob(a,
c):new Blob([a],{type:c}));g?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(l){}}else this.createEchoRequest(a,b,c,f,h).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,f,h,k){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=h?"&format="+h:"")+(null!=k?"&base64="+k:"")+(null!=b?"&filename="+
-encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,g=Math.ceil(c/1024),f=Array(g),h=0;h<g;++h){for(var k=1024*h,l=Math.min(k+1024,c),x=Array(l-k),m=0;k<l;++m,++k)x[m]=d[k].charCodeAt(0);f[h]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,f,h,k,m){k=null!=k?k:!1;m=null!=m?m:"vsdx"!=h&&(!mxClient.IS_IOS||!navigator.standalone);h=this.getServiceCount(k);b=new CreateDialog(this,
+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,g=Math.ceil(c/1024),f=Array(g),h=0;h<g;++h){for(var k=1024*h,l=Math.min(k+1024,c),m=Array(l-k),p=0;k<l;++p,++k)m[p]=d[k].charCodeAt(0);f[h]=new Uint8Array(m)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,f,h,k,m){k=null!=k?k:!1;m=null!=m?m:"vsdx"!=h&&(!mxClient.IS_IOS||!navigator.standalone);h=this.getServiceCount(k);b=new CreateDialog(this,
b,mxUtils.bind(this,function(b,d){try{if("_blank"==d)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a,!1)),g.document.close())}else this.openInNewWindow(a,c,f);else d==App.MODE_DEVICE||"download"==d?this.doSaveLocalFile(a,b,c,f):null!=b&&0<b.length&&this.pickFolder(d,mxUtils.bind(this,function(g){try{this.exportFile(a,b,c,f,d,g)}catch(E){this.handleError(E)}}))}catch(z){this.handleError(z)}}),
mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,m,null,1<h,4<h&&(!k||6>h)?3:4,a,c,f);this.showDialog(b.container,420,1==h?160:4<h?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+
b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);
@@ -8023,10 +8047,10 @@ A.setAttribute("disabled","disabled");A.checked&&F.checked?I.getEditSelect().rem
"nowrap";var g=document.createElement("h3");mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var l=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));n.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));q.style.marginTop="12px";q.className="geBtn";n.appendChild(q);d.appendChild(n);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));
n.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,u=null;if(null!=c||null!=f)a+=30,mxUtils.write(d,mxResources.get("width")+":"),m=document.createElement("input"),
-m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",d.appendChild(m),mxUtils.write(d,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=f+"px",d.appendChild(u),mxUtils.br(d);var v=this.addLinkSection(d,k);c=null!=this.pages&&1<this.pages.length;var p=null;
-if(null==l||l.constructor!=window.DriveFile||b)p=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,t),I=F.getEditInput(),A=this.addCheckbox(d,mxResources.get("layers"),!0);A.style.marginLeft=I.style.marginLeft;A.style.marginBottom="16px";A.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(A.removeAttribute("disabled"),I.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),I.setAttribute("disabled",
-"disabled"));I.checked&&t.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){h(v.getTarget(),v.getColor(),null==p?!0:p.checked,t.checked,F.getLink(),A.checked,null!=m?m.value:null,null!=u?u.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
-document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(g);var n=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),h=f?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",d.appendChild(m),mxUtils.write(d,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=f+"px",d.appendChild(u),mxUtils.br(d);var p=this.addLinkSection(d,k);c=null!=this.pages&&1<this.pages.length;var v=null;
+if(null==l||l.constructor!=window.DriveFile||b)v=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,t),I=F.getEditInput(),A=this.addCheckbox(d,mxResources.get("layers"),!0);A.style.marginLeft=I.style.marginLeft;A.style.marginBottom="16px";A.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(A.removeAttribute("disabled"),I.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),I.setAttribute("disabled",
+"disabled"));I.checked&&t.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){h(p.getTarget(),p.getColor(),null==v?!0:v.checked,t.checked,F.getLink(),A.checked,null!=m?m.value:null,null!=u?u.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
+document.execCommand("selectAll",!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(g);var n=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),h=f?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
!0),g=this.editor.graph,l=f?null:this.addCheckbox(d,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=l&&(l.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!n.checked,null!=h?h.checked:!1,null!=l?l.checked:!1)}),null,a,b);this.showDialog(a.container,300,f?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,f,h,k,m,p){m=null!=m?m:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=
this.editor.graph,n="jpeg"==p?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(q);mxUtils.write(d,mxResources.get("zoom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value=this.lastExportZoom||"100%";d.appendChild(u);mxUtils.write(d,mxResources.get("borderWidth")+":");
var w=document.createElement("input");w.setAttribute("type","text");w.style.marginRight="16px";w.style.width="60px";w.style.marginLeft="4px";w.value=this.lastExportBorder||"0";d.appendChild(w);mxUtils.br(d);var v=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=p),t=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled",
@@ -8061,10 +8085,10 @@ f));d--;0==d&&b(a)})):c.setAttribute(h,n)}else null!=l&&c.setAttribute(h,l)})(l[
function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=
function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var d=new Image,c=this;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){var a=document.createElement("canvas"),g=a.getContext("2d");a.height=d.height;a.width=d.width;g.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=
function(a,b,c,f,h){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var n=mxUtils.parseXml(a),l=this.editor.extractGraphModel(n.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var k=l.getElementsByTagName("diagram");if(1==k.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(k[0]))).documentElement;else if(1<k.length){g.model.beginUpdate();try{for(a=0;a<k.length;a++){k[a].removeAttribute("id");var m=this.updatePageRoot(new DiagramPage(k[a])),
-q=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,m,m,q))}}finally{g.model.endUpdate()}}}null!=l&&"mxGraphModel"===l.nodeName&&(d=g.importGraphModel(l,b,c,f))}}catch(C){throw h||this.handleError(C,mxResources.get("invalidOrMissingFile")),C;}return d};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,f){f=null!=
-f?f:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(f)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a,f);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType="blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{g.response.name=f,this.doImportVisio(g.response,b,c)}catch(y){c(y)}else c({})});
-g.send(d)}else try{this.doImportVisio(a,b,c)}catch(y){c(y)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(u){c(u)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?
-d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(g){this.handleError(g)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,
+q=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,m,m,q))}}finally{g.model.endUpdate()}}}null!=l&&"mxGraphModel"===l.nodeName&&(d=g.importGraphModel(l,b,c,f))}}catch(C){if(h)throw C;this.handleError(C)}return d};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,f){f=null!=f?f:a.name;c=null!=c?c:mxUtils.bind(this,
+function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(f)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a,f);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType="blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{g.response.name=f,this.doImportVisio(g.response,b,c)}catch(y){c(y)}else c({})});g.send(d)}else try{this.doImportVisio(a,
+b,c)}catch(y){c(y)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(u){c(u)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
+d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,
function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{b(LucidImporter.importState(JSON.parse(a)))}catch(u){c(u)}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,
g=null;d.getModel().beginUpdate();try{g=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=center;verticalAlign=middle;"),d.updateCellSize(g,!0)}finally{d.getModel().endUpdate()}return g};EditorUi.prototype.insertTextAt=function(a,b,c,f,h,k,m){k=null!=k?k:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,
function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(h||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var g=this.extractGraphModelFromPng(a),n=this.importXml(g,b,c,k,!0);if(0<n.length)return n}if("data:image/svg+xml;"==a.substring(0,19))try{if(g=null,"data:image/svg+xml;base64,"==a.substring(0,
@@ -8073,32 +8097,32 @@ this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.m
null,a,d.snap(b),d.snap(c),1,1,"text;"+(f?"html=1;":"")),d.updateCellSize(g),d.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{d.getModel().endUpdate()}d.setSelectionCell(g)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,c,k))}),mxUtils.bind(this,function(a){this.handleError(a)}));
else{d=this.editor.graph;h=null;d.getModel().beginUpdate();try{h=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(f?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[h])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),h.value=a,d.updateCellSize(h),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(h.value)&&
d.setLinkForCell(h,h.value),h.geometry.width+=d.gridSize,h.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[h]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
-function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&'{"state":"{\\"Properties\\":'==a.substring(0,26)};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&
-this.importFiles(d.files,null,null,this.maxImageSize)}));d.click()}else{window.openNew=!1;window.openKey="import";if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var d=new Blob([a],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(a){this.importXml(a)}),
-null,b)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var g=this.dialog,f=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;f.apply(g,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,f,h,k,m,p,l,x,t){x=null!=x?x:!0;var d=!1,g=null,n=mxUtils.bind(this,function(a){var b=
+function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&'{"state":"{\\"Properties\\":'==a.substring(0,26)};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&
+this.importFiles(c.files,null,null,this.maxImageSize)}));c.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a)}),
+null,b)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var g=this.dialog,f=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(g,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,c,f,h,k,m,p,l,x,t){x=null!=x?x:!0;var d=!1,g=null,n=mxUtils.bind(this,function(a){var b=
null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):b=this.importXml(a,c,f,x);null!=p&&p(b)});"image"==b.substring(0,5)?(l=!1,"image/png"==b.substring(0,9)&&(b=t?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,c,f,x),l=!0)),l||(g=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),x&&g.isGridEnabled()&&(c=g.snap(c),f=g.snap(f)),g=[g.insertVertex(null,null,"",c,f,h,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,n)):null!=l&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(d=!0,this.importVisio(l,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(d=!0,this.parseFile(null!=l?l:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?n(a.responseText):null!=p&&p(null))}),m)):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||
-(g=this.insertTextAt(this.validateFileData(a),c,f,!0,null,x));d||null==p||p(g);return g};EditorUi.prototype.base64Encode=function(a){for(var b="",d=0,c=a.length,f,h,k;d<c;){f=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}h=a.charCodeAt(d++);if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);
-b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);b+="=";break}k=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(k&192)>>6);b+=
+(g=this.insertTextAt(this.validateFileData(a),c,f,!0,null,x));d||null==p||p(g);return g};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,h,k;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}h=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);
+b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);b+="=";break}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(k&192)>>6);b+=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,f,h,k,m,p,l,x,t,E){b=null!=b?b:0;c=null!=c?c:0;f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=b&&null!=c,g=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=t||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>q){n=!0;break}var w=mxUtils.bind(this,function(){var l=this.editor.graph,n=l.gridSize;
h=null!=h?h:mxUtils.bind(this,function(a,b,c,f,g,l,h,k,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,f,g,l,h,k,n,d,E)});k=null!=k?k:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,u=q,w=[],v=mxUtils.bind(this,function(a,b){w[a]=b;if(0==--u){this.spinner.stop();if(null!=p)p(w);else{var c=[];l.getModel().beginUpdate();
try{for(var d=0;d<w.length;d++){var f=w[d]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}k(c)}}),z=0;z<q;z++)mxUtils.bind(this,function(d){var k=a[d],q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,u=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(u+1)))),w=mxUtils.parseXml(p),p=w.getElementsByTagName("svg");if(0<p.length){var p=p[0],z=E?null:p.getAttribute("content");
-null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?v(d,mxUtils.bind(this,function(){try{if(q.substring(0,u+1),null!=w){var a=w.getElementsByTagName("svg");if(0<a.length){var g=a[0],m=parseFloat(g.getAttribute("width")),x=parseFloat(g.getAttribute("height")),p=g.getAttribute("viewBox");if(null==p||0==p.length)g.setAttribute("viewBox",
-"0 0 "+m+" "+x);else if(isNaN(m)||isNaN(x)){var t=p.split(" ");3<t.length&&(m=parseFloat(t[2]),x=parseFloat(t[3]))}q=this.createSvgDataUri(mxUtils.getXml(g));var v=Math.min(1,Math.min(f/Math.max(1,m)),f/Math.max(1,x)),E=h(q,k.type,b+d*n,c+d*n,Math.max(1,Math.round(m*v)),Math.max(1,Math.round(x*v)),k.name);if(isNaN(m)||isNaN(x)){var z=new Image;z.onload=mxUtils.bind(this,function(){m=Math.max(1,z.width);x=Math.max(1,z.height);E[0].geometry.width=m;E[0].geometry.height=x;g.setAttribute("viewBox","0 0 "+
-m+" "+x);q=this.createSvgDataUri(mxUtils.getXml(g));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));l.setCellStyles("image",q,[E[0]])});z.src=this.createSvgDataUri(mxUtils.getXml(g))}return E}}}catch(na){}return null})):v(d,mxUtils.bind(this,function(){return h(z,"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else v(d,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==k.type){var A=E?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=
+null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?v(d,mxUtils.bind(this,function(){try{if(q.substring(0,u+1),null!=w){var a=w.getElementsByTagName("svg");if(0<a.length){var g=a[0],m=parseFloat(g.getAttribute("width")),p=parseFloat(g.getAttribute("height")),x=g.getAttribute("viewBox");if(null==x||0==x.length)g.setAttribute("viewBox",
+"0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var t=x.split(" ");3<t.length&&(m=parseFloat(t[2]),p=parseFloat(t[3]))}q=this.createSvgDataUri(mxUtils.getXml(g));var v=Math.min(1,Math.min(f/Math.max(1,m)),f/Math.max(1,p)),z=h(q,k.type,b+d*n,c+d*n,Math.max(1,Math.round(m*v)),Math.max(1,Math.round(p*v)),k.name);if(isNaN(m)||isNaN(p)){var E=new Image;E.onload=mxUtils.bind(this,function(){m=Math.max(1,E.width);p=Math.max(1,E.height);z[0].geometry.width=m;z[0].geometry.height=p;g.setAttribute("viewBox","0 0 "+
+m+" "+p);q=this.createSvgDataUri(mxUtils.getXml(g));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));l.setCellStyles("image",q,[z[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(g))}return z}}}catch(na){}return null})):v(d,mxUtils.bind(this,function(){return h(z,"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else v(d,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==k.type){var A=E?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=
new Image;y.src=a.target.result;v(d,mxUtils.bind(this,function(){return h(A,"text/xml",b+d*n,c+d*n,y.width,y.height,k.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,a.target.result,
mxUtils.bind(this,function(l,m,q){v(d,mxUtils.bind(this,function(){if(null!=l&&l.length<x){var u=g&&this.isResampleImage(a.target.result,t)?Math.min(1,Math.min(f/m,f/q)):1;return h(l,k.type,b+d*n,c+d*n,Math.round(m*u),Math.round(q*u),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,f,t)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else h(a.target.result,k.type,b+d*n,c+d*n,240,160,k.name,function(a){v(d,
-function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?h(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){v(d,function(){return a})},k):"image"==k.type.substring(0,5)?q.readAsDataURL(k):q.readAsText(k)})(z)});n?this.confirmImageResize(function(a){g=a;w()},l):w()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?
-mxSettings.getResizeImages():null,f=function(c,f){if(c||b)mxSettings.setResizeImages(c?f:null),mxSettings.save();d();a(f)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||
-mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,f,h,k){h=null!=h?h:this.maxImageSize;var d=Math.max(1,a.width),g=Math.max(1,a.height);
-if(f&&this.isResampleImage(b,k))try{var l=Math.max(d/h,g/h);if(1<l){var n=Math.round(d/l),m=Math.round(g/l),q=document.createElement("canvas");q.width=n;q.height=m;q.getContext("2d").drawImage(a,0,0,n,m);var u=q.toDataURL();if(u.length<b.length){var p=document.createElement("canvas");p.width=n;p.height=m;var t=p.toDataURL();u!==t&&(b=u,d=n,g=m)}}}catch(D){}c(b,d,g)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var f=b,h=0;8>h;h++)f=1==(f&1)?3988292384^f>>>1:f>>>1,EditorUi.prototype.crcTable[b]=
+function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?h(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){v(d,function(){return a})},k):"image"==k.type.substring(0,5)?q.readAsDataURL(k):q.readAsText(k)})(z)});n?this.confirmImageResize(function(a){g=a;w()},l):w()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
+mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||
+mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,f,h,k){h=null!=h?h:this.maxImageSize;var d=Math.max(1,a.width),g=Math.max(1,a.height);
+if(f&&this.isResampleImage(b,k))try{var l=Math.max(d/h,g/h);if(1<l){var n=Math.round(d/l),m=Math.round(g/l),q=document.createElement("canvas");q.width=n;q.height=m;q.getContext("2d").drawImage(a,0,0,n,m);var u=q.toDataURL();if(u.length<b.length){var p=document.createElement("canvas");p.width=n;p.height=m;var t=p.toDataURL();u!==t&&(b=u,d=n,g=m)}}}catch(D){}c(b,d,g)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var f=b,k=0;8>k;k++)f=1==(f&1)?3988292384^f>>>1:f>>>1,EditorUi.prototype.crcTable[b]=
f;EditorUi.prototype.updateCRC=function(a,b,c,f){for(var d=0;d<f;d++)a=EditorUi.prototype.crcTable[(a^b[c+d])&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,f,h){function d(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<
16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(d(a,4),"IHDR"!=d(a,4))null!=h&&h();else{d(a,17);h=a.substring(0,l);do{var n=g(a);if("IDAT"==d(a,4)){h=a.substring(0,l-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;f=this.updateCRC(f,
b,0,4);f=this.updateCRC(f,c,0,c.length);h+=k(c.length)+b+c+k(f^4294967295);h+=a.substring(l-8,a.length);break}h+=a.substring(l-8,l-4+n);d(a,n);d(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(h):Base64.encode(h,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),
"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(u){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=
-c);d.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(A){a.handleError(A)}return c};var c=this.clearDefaultStyle;this.clearDefaultStyle=function(){c.apply(this,
+c);d.src=a};var h=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(A){a.handleError(A)}return c};var c=this.clearDefaultStyle;this.clearDefaultStyle=function(){c.apply(this,
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var f=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return f.apply(this,arguments)};
-var h=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};h.call(this,a,c,d)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
+var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};k.call(this,a,c,d)};h.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:m.apply(this,arguments)};var p=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))p.apply(this,
arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless||this.editor.editable){var l=function(){window.setTimeout(function(){x.innerHTML="&nbsp;";
x.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
@@ -8149,20 +8173,20 @@ window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh(
pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,h=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var l=g.data,h=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
(a=this.editor.graph.decompress(a)))}catch(M){}return a});if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(J){l=null}if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();h=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?
-mxResources.get(l.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(h.container,300,80,!0,!1);h.init();return}if("draft"==l.action){var n=h(l.xml);this.spinner.stop();h=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),
+mxResources.get(l.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(h.container,300,80,!0,!1);h.init();return}if("draft"==l.action){var m=h(l.xml);this.spinner.stop();h=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),
mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(h.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{h.init()}catch(J){k.postMessage(JSON.stringify({event:"draft",
-error:J.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();h=1==l.enableRecent;n=1==l.enableSearch;h=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,h?mxUtils.bind(this,function(a){this.recentReadyCallback=
-a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==l.action)this.searchReadyCallback(l.list,l.errorMsg);else if("recentDocsList"==
-l.action)this.recentReadyCallback(l.list,l.errorMsg);else{if("textContent"==l.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,h="";if(null!=this.pages)for(n=0;n<this.pages.length;n++){var q=m;this.currentPage!=this.pages[n]&&(q=this.createTemporaryGraph(m.getStylesheet()),q.model.setRoot(this.pages[n].root));h+=this.pages[n].getName()+" "+q.getIndexableText()+" "}else h=m.getIndexableText();this.editor.graph.setEnabled(!0);k.postMessage(JSON.stringify({event:"textContent",data:h,
+error:J.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();h=1==l.enableRecent;m=1==l.enableSearch;h=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,h?mxUtils.bind(this,function(a){this.recentReadyCallback=
+a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,m?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==l.action)this.searchReadyCallback(l.list,l.errorMsg);else if("recentDocsList"==
+l.action)this.recentReadyCallback(l.list,l.errorMsg);else{if("textContent"==l.action){this.editor.graph.setEnabled(!1);var n=this.editor.graph,h="";if(null!=this.pages)for(m=0;m<this.pages.length;m++){var q=n;this.currentPage!=this.pages[m]&&(q=this.createTemporaryGraph(n.getStylesheet()),q.model.setRoot(this.pages[m].root));h+=this.pages[m].getName()+" "+q.getIndexableText()+" "}else h=n.getIndexableText();this.editor.graph.setEnabled(!0);k.postMessage(JSON.stringify({event:"textContent",data:h,
message:l}),"*");return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var p=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==
-l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var t=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.message=l;b.data=a;b.xml=encodeURIComponent(t);k.postMessage(JSON.stringify(b),"*")}),w=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(t))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),v=m.getGlobalVariable,A=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?A.getName():"pagenumber"==a?1:v.apply(this,arguments)};document.body.appendChild(m.container);
-m.model.setRoot(A.root)}this.exportToCanvas(mxUtils.bind(this,function(a){w(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){w(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(t)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):w(null)}),mxUtils.bind(this,function(){w(null)}))}}else{null!=
+l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var t=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var n=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=l.format;b.message=l;b.data=a;b.xml=encodeURIComponent(t);k.postMessage(JSON.stringify(b),"*")}),w=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(t))));n!=this.editor.graph&&n.container.parentNode.removeChild(n.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var n=this.createTemporaryGraph(n.getStylesheet()),v=n.getGlobalVariable,A=this.pages[0];n.getGlobalVariable=function(a){return"page"==a?A.getName():"pagenumber"==a?1:v.apply(this,arguments)};document.body.appendChild(n.container);
+n.model.setRoot(A.root)}this.exportToCanvas(mxUtils.bind(this,function(a){w(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){w(null)}),null,null,null,null,null,null,n)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(t)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):w(null)}),mxUtils.bind(this,function(){w(null)}))}}else{null!=
l.xml&&0<l.xml.length&&this.setFileData(l.xml);p=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))h=this.getXmlFileData(),p.xml=mxUtils.getXml(h),p.data=this.getFileData(null,null,!0,null,null,null,h),p.format=l.format;else if("html"==l.format)t=this.editor.getGraphXml(),p.data=this.getHtml(t,this.editor.graph),p.xml=mxUtils.getXml(t),p.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;h=this.editor.graph.background;
h==mxConstants.NONE&&(h=null);p.xml=this.getFileData(!0);p.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(h),
mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(p),"*")}));return}h="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));p.data=this.createSvgDataUri(h)}k.postMessage(JSON.stringify(p),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=
-l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):l.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}}var y=mxUtils.bind(this,function(g,l){c=!0;try{a(g,l)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var h=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});
+l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(m),this.embedFilenameSpan=m),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):l.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}}var y=mxUtils.bind(this,function(g,l){c=!0;try{a(g,l)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var h=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});
f=h();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=h();if(d!=f&&!c){var g=this.createLoadMessage("autosave");g.xml=d;d=JSON.stringify(g);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",
b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=l&&"function"===typeof l.substring&&"data:application/vnd.visio;base64,"==l.substring(0,34)?(h="0M8R4KGxGuE"==l.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(l.substring(l.indexOf(",")+
1)),function(a){y(a,g)},mxUtils.bind(this,function(a){this.handleError(a)}),h)):null!=l&&"function"===typeof l.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,"")?this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&y(a.responseText,g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,
@@ -8193,42 +8217,42 @@ this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").
this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);
mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var f=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=f.status,b;a==f.CHECKING&&(a=f.DOWNLOADING);switch(a){case f.UNCACHED:b="";break;case f.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case f.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+
IMAGE_PATH+'/spin.gif"/>';break;case f.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case f.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=h&&(this.offlineStatus.innerHTML=b,h=a)});mxEvent.addListener(f,"checking",b);mxEvent.addListener(f,"noupdate",b);mxEvent.addListener(f,"downloading",
-b);mxEvent.addListener(f,"progress",b);mxEvent.addListener(f,"cached",b);mxEvent.addListener(f,"updateready",b);mxEvent.addListener(f,"obsolete",b);mxEvent.addListener(f,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;
-EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);
+b);mxEvent.addListener(f,"progress",b);mxEvent.addListener(f,"cached",b);mxEvent.addListener(f,"updateready",b);mxEvent.addListener(f,"obsolete",b);mxEvent.addListener(f,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;
+EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);
this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));
this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);
-this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,f,h,k){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(f,h,k)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*h/d.view.scale),
+this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var p=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);p.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,f,h,k){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(f,h,k)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*h/d.view.scale),
n=Math.floor(l.height*h/d.view.scale);g.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=f?f:"none")+"&w="+m+"&h="+n+"&border="+k+"&xml="+encodeURIComponent(g))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var f=this.getFutureCellForEdit(c.model,a,d.source.id);f!=d.source&&(d.source=f)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var f=b.changes.length-1;0<=f;f--){var g=b.changes[f];if(g.constructor==mxChildChange&&null!=g.child&&g.child.id==c){a.contains(g.previous)&&
(d=g.child);break}}return d}})();EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
-EditorUi.prototype.patchPages=function(a,c,b,f,h){var k={},m=[],p={},t={},d={},g={};if(null!=f&&null!=f[EditorUi.DIFF_UPDATE])for(var n in f[EditorUi.DIFF_UPDATE])k[n]=f[EditorUi.DIFF_UPDATE][n];if(null!=c[EditorUi.DIFF_REMOVE])for(f=0;f<c[EditorUi.DIFF_REMOVE].length;f++)t[c[EditorUi.DIFF_REMOVE][f]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(f=0;f<c[EditorUi.DIFF_INSERT].length;f++)p[c[EditorUi.DIFF_INSERT][f].previous]=c[EditorUi.DIFF_INSERT][f];if(null!=c[EditorUi.DIFF_UPDATE])for(n in c[EditorUi.DIFF_UPDATE])f=
-c[EditorUi.DIFF_UPDATE][n],null!=f.previous&&(g[f.previous]=n);if(null!=a){var q="";for(f=0;f<a.length;f++){var u=a[f].getId();d[u]=a[f];null!=g[q]||t[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(g[q]=u);q=u}}var v={},w=mxUtils.bind(this,function(a){var f=null!=a?a.getId():"";if(null!=a&&!v[f]){v[f]=!0;m.push(a);var l=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][f]:null;null!=l&&(this.updatePageRoot(a),null!=l.name&&a.setName(l.name),
-null!=l.view&&this.patchViewState(a,l.view),null!=l.cells&&this.patchPage(a,l.cells,k[a.getId()],h),!b||null==l.cells&&null==l.view||(a.needsUpdate=!0))}a=g[f];null!=a&&(delete g[f],w(d[a]));a=p[f];null!=a&&(delete p[f],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=d[a.getId()];null==c?w(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});w();for(n in g)w(d[g[n]]),
-delete g[n];for(n in p)y(p[n]),delete p[n];return m};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
-EditorUi.prototype.createParentLookup=function(a,c){function b(a){var b=f[a];null==b&&(b={inserted:[],moved:{}},f[a]=b);return b}var f={};if(null!=c[EditorUi.DIFF_INSERT])for(var h=0;h<c[EditorUi.DIFF_INSERT].length;h++){var k=c[EditorUi.DIFF_INSERT][h],m=null!=k.parent?k.parent:"",p=null!=k.previous?k.previous:"";b(m).inserted[p]=k}if(null!=c[EditorUi.DIFF_UPDATE])for(var t in c[EditorUi.DIFF_UPDATE])k=c[EditorUi.DIFF_UPDATE][t],null!=k.previous&&(m=k.parent,null==m&&(h=a.getCell(t),null!=h&&(h=
-a.getParent(h),null!=h&&(m=h.getId()))),null!=m&&(b(m).moved[k.previous]=t));return f};
-EditorUi.prototype.patchPage=function(a,c,b,f){var h=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),k=this.createParentLookup(h,c);h.beginUpdate();try{var m=h.updateEdgeParent,p=new mxDictionary,t=[];h.updateEdgeParent=function(a,b){!p.get(a)&&f&&(p.put(a,!0),t.push(a))};var d=k[""],g=null!=d&&null!=d.inserted?d.inserted[""]:null,n=null;null!=g&&(n=this.getCellForJson(g));if(null==n){var q=null!=d&&null!=d.moved?d.moved[""]:null;null!=q&&(n=h.getCell(q))}null!=n&&(h.setRoot(n),
-a.root=n);this.patchCellRecursive(a,h,h.root,k,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var v=h.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=v&&h.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var w=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(q in c[EditorUi.DIFF_UPDATE])this.patchCell(h,h.getCell(q),c[EditorUi.DIFF_UPDATE][q],null!=w?w[q]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)g=c[EditorUi.DIFF_INSERT][u],
-v=h.getCell(g.id),null!=v&&(h.setTerminal(v,h.getCell(g.source),!0),h.setTerminal(v,h.getCell(g.target),!1));h.updateEdgeParent=m;if(f&&0<t.length)for(u=0;u<t.length;u++)h.contains(t[u])&&h.updateEdgeParent(t[u])}finally{h.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,c,b,f,h){if(null!=b){for(var k=f[b.getId()],m=null!=k&&null!=k.inserted?k.inserted:{},p=null!=k&&null!=k.moved?k.moved:{},t=0,k=c.getChildCount(b),d="",g=0;g<k;g++){var n=c.getChildAt(b,g).getId();null==p[d]&&(null==h[EditorUi.DIFF_UPDATE]||null==h[EditorUi.DIFF_UPDATE][n]||null==h[EditorUi.DIFF_UPDATE][n].previous&&null==h[EditorUi.DIFF_UPDATE][n].parent)&&(p[d]=n);d=n}var q=mxUtils.bind(this,function(d){var g=null!=d?d.getId():"";null!=d&&(c.getChildAt(b,
-t)!=d&&c.add(b,d,t),this.patchCellRecursive(a,c,d,f,h),t++);d=p[g];null!=d&&(delete p[g],q(c.getCell(d)));d=m[g];null!=d&&(delete m[g],q(this.getCellForJson(d)))});q();for(var u in p)q(c.getCell(p[u])),delete p[u];for(u in m)q(this.getCellForJson(m[u])),delete m[u]}};
+EditorUi.prototype.patchPages=function(a,c,b,f,k){var h={},m=[],t={},p={},d={},g={};if(null!=f&&null!=f[EditorUi.DIFF_UPDATE])for(var n in f[EditorUi.DIFF_UPDATE])h[n]=f[EditorUi.DIFF_UPDATE][n];if(null!=c[EditorUi.DIFF_REMOVE])for(f=0;f<c[EditorUi.DIFF_REMOVE].length;f++)p[c[EditorUi.DIFF_REMOVE][f]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(f=0;f<c[EditorUi.DIFF_INSERT].length;f++)t[c[EditorUi.DIFF_INSERT][f].previous]=c[EditorUi.DIFF_INSERT][f];if(null!=c[EditorUi.DIFF_UPDATE])for(n in c[EditorUi.DIFF_UPDATE])f=
+c[EditorUi.DIFF_UPDATE][n],null!=f.previous&&(g[f.previous]=n);if(null!=a){var q="";for(f=0;f<a.length;f++){var u=a[f].getId();d[u]=a[f];null!=g[q]||p[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(g[q]=u);q=u}}var v={},w=mxUtils.bind(this,function(a){var f=null!=a?a.getId():"";if(null!=a&&!v[f]){v[f]=!0;m.push(a);var l=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][f]:null;null!=l&&(this.updatePageRoot(a),null!=l.name&&a.setName(l.name),
+null!=l.view&&this.patchViewState(a,l.view),null!=l.cells&&this.patchPage(a,l.cells,h[a.getId()],k),!b||null==l.cells&&null==l.view||(a.needsUpdate=!0))}a=g[f];null!=a&&(delete g[f],w(d[a]));a=t[f];null!=a&&(delete t[f],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=d[a.getId()];null==c?w(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});w();for(n in g)w(d[g[n]]),
+delete g[n];for(n in t)y(t[n]),delete t[n];return m};EditorUi.prototype.patchViewState=function(a,c){if(null!=a.viewState&&null!=c){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var b in c)a.viewState[b]=JSON.parse(c[b]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState)}};
+EditorUi.prototype.createParentLookup=function(a,c){function b(a){var b=f[a];null==b&&(b={inserted:[],moved:{}},f[a]=b);return b}var f={};if(null!=c[EditorUi.DIFF_INSERT])for(var k=0;k<c[EditorUi.DIFF_INSERT].length;k++){var h=c[EditorUi.DIFF_INSERT][k],m=null!=h.parent?h.parent:"",t=null!=h.previous?h.previous:"";b(m).inserted[t]=h}if(null!=c[EditorUi.DIFF_UPDATE])for(var p in c[EditorUi.DIFF_UPDATE])h=c[EditorUi.DIFF_UPDATE][p],null!=h.previous&&(m=h.parent,null==m&&(k=a.getCell(p),null!=k&&(k=
+a.getParent(k),null!=k&&(m=k.getId()))),null!=m&&(b(m).moved[h.previous]=p));return f};
+EditorUi.prototype.patchPage=function(a,c,b,f){var k=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),h=this.createParentLookup(k,c);k.beginUpdate();try{var m=k.updateEdgeParent,t=new mxDictionary,p=[];k.updateEdgeParent=function(a,b){!t.get(a)&&f&&(t.put(a,!0),p.push(a))};var d=h[""],g=null!=d&&null!=d.inserted?d.inserted[""]:null,n=null;null!=g&&(n=this.getCellForJson(g));if(null==n){var q=null!=d&&null!=d.moved?d.moved[""]:null;null!=q&&(n=k.getCell(q))}null!=n&&(k.setRoot(n),
+a.root=n);this.patchCellRecursive(a,k,k.root,h,c);if(null!=c[EditorUi.DIFF_REMOVE])for(var u=0;u<c[EditorUi.DIFF_REMOVE].length;u++){var v=k.getCell(c[EditorUi.DIFF_REMOVE][u]);null!=v&&k.remove(v)}if(null!=c[EditorUi.DIFF_UPDATE]){var w=null!=b&&null!=b.cells?b.cells[EditorUi.DIFF_UPDATE]:null;for(q in c[EditorUi.DIFF_UPDATE])this.patchCell(k,k.getCell(q),c[EditorUi.DIFF_UPDATE][q],null!=w?w[q]:null)}if(null!=c[EditorUi.DIFF_INSERT])for(u=0;u<c[EditorUi.DIFF_INSERT].length;u++)g=c[EditorUi.DIFF_INSERT][u],
+v=k.getCell(g.id),null!=v&&(k.setTerminal(v,k.getCell(g.source),!0),k.setTerminal(v,k.getCell(g.target),!1));k.updateEdgeParent=m;if(f&&0<p.length)for(u=0;u<p.length;u++)k.contains(p[u])&&k.updateEdgeParent(p[u])}finally{k.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(a,c,b,f,k){if(null!=b){for(var h=f[b.getId()],m=null!=h&&null!=h.inserted?h.inserted:{},t=null!=h&&null!=h.moved?h.moved:{},p=0,h=c.getChildCount(b),d="",g=0;g<h;g++){var n=c.getChildAt(b,g).getId();null==t[d]&&(null==k[EditorUi.DIFF_UPDATE]||null==k[EditorUi.DIFF_UPDATE][n]||null==k[EditorUi.DIFF_UPDATE][n].previous&&null==k[EditorUi.DIFF_UPDATE][n].parent)&&(t[d]=n);d=n}var q=mxUtils.bind(this,function(d){var g=null!=d?d.getId():"";null!=d&&(c.getChildAt(b,
+p)!=d&&c.add(b,d,p),this.patchCellRecursive(a,c,d,f,k),p++);d=t[g];null!=d&&(delete t[g],q(c.getCell(d)));d=m[g];null!=d&&(delete m[g],q(this.getCellForJson(d)))});q();for(var u in t)q(c.getCell(t[u])),delete t[u];for(u in m)q(this.getCellForJson(m[u])),delete m[u]}};
EditorUi.prototype.patchCell=function(a,c,b,f){if(null!=c&&null!=b){if(null==f||null==f.xmlValue&&(null==f.value||""==f.value))"value"in b?a.setValue(c,b.value):null!=b.xmlValue&&a.setValue(c,mxUtils.parseXml(b.xmlValue).documentElement);null!=f&&null!=f.style||null==b.style||a.setStyle(c,b.style);null!=b.visible&&a.setVisible(c,1==b.visible);null!=b.collapsed&&a.setCollapsed(c,1==b.collapsed);null!=b.vertex&&(c.vertex=1==b.vertex);null!=b.edge&&(c.edge=1==b.edge);null!=b.connectable&&(c.connectable=
-1==b.connectable);null!=b.geometry&&a.setGeometry(c,this.codec.decode(mxUtils.parseXml(b.geometry).documentElement));null!=b.source&&a.setTerminal(c,a.getCell(b.source),!0);null!=b.target&&a.setTerminal(c,a.getCell(b.target),!1);for(var h in b)this.cellProperties[h]||(c[h]=b[h])}};
-EditorUi.prototype.getPagesForNode=function(a,c){var b=this.editor.extractGraphModel(a,!0);null!=b&&(a=b);for(var b=a.getElementsByTagName(c||"diagram"),f=[],h=0;h<b.length;h++){var k=new DiagramPage(b[h]);this.updatePageRoot(k);f.push(k)}return f};
-EditorUi.prototype.diffPages=function(a,c){for(var b=[],f=[],h={},k={},m={},p=null,t=0;t<c.length;t++)k[c[t].getId()]={page:c[t],prev:p},p=c[t];p=null;for(t=0;t<a.length;t++){var d=a[t].getId(),g=k[d];if(null==g)f.push(d);else{var n=this.diffPage(a[t],g.page),q={};0<Object.keys(n).length&&(q.cells=n);n=this.diffViewState(a[t],g.page);0<Object.keys(n).length&&(q.view=n);if((null!=g.prev?null==p:null!=p)||null!=p&&null!=g.prev&&p.getId()!=g.prev.getId())q.previous=null!=g.prev?g.prev.getId():"";null!=
-g.page.getName()&&a[t].getName()!=g.page.getName()&&(q.name=g.page.getName());0<Object.keys(q).length&&(m[d]=q)}delete k[a[t].getId()];p=a[t]}for(d in k)g=k[d],b.push({data:mxUtils.getXml(g.page.node),previous:null!=g.prev?g.prev.getId():""});0<Object.keys(m).length&&(h[EditorUi.DIFF_UPDATE]=m);0<f.length&&(h[EditorUi.DIFF_REMOVE]=f);0<b.length&&(h[EditorUi.DIFF_INSERT]=b);return h};
-EditorUi.prototype.createCellLookup=function(a,c,b){b=null!=b?b:{};b[a.getId()]={cell:a,prev:c};var f=a.getChildCount();c=null;for(var h=0;h<f;h++){var k=a.getChildAt(h);this.createCellLookup(k,c,b);c=k}return b};
-EditorUi.prototype.diffCellRecursive=function(a,c,b,f,h){f=null!=f?f:{};var k=b[a.getId()];delete b[a.getId()];if(null==k)h.push(a.getId());else{var m=this.diffCell(a,k.cell);if(null!=m.parent||(null!=k.prev?null==c:null!=c)||null!=c&&null!=k.prev&&c.getId()!=k.prev.getId())m.previous=null!=k.prev?k.prev.getId():"";0<Object.keys(m).length&&(f[a.getId()]=m)}k=a.getChildCount();c=null;for(m=0;m<k;m++){var p=a.getChildAt(m);this.diffCellRecursive(p,c,b,f,h);c=p}return f};
-EditorUi.prototype.diffPage=function(a,c){var b=[],f=[],h={};this.updatePageRoot(a);this.updatePageRoot(c);var k=this.createCellLookup(c.root),m=this.diffCellRecursive(a.root,null,k,m,f),p;for(p in k){var t=k[p];b.push(this.getJsonForCell(t.cell,t.prev))}0<Object.keys(m).length&&(h[EditorUi.DIFF_UPDATE]=m);0<f.length&&(h[EditorUi.DIFF_REMOVE]=f);0<b.length&&(h[EditorUi.DIFF_INSERT]=b);return h};
-EditorUi.prototype.diffViewState=function(a,c){var b=a.viewState,f=c.viewState,h={};c==this.currentPage&&(f=this.editor.graph.getViewState());if(null!=b&&null!=f)for(var k in this.viewStateProperties){var m=JSON.stringify(b[k]),p=JSON.stringify(f[k]);m!=p&&(h[k]=p)}return h};
+1==b.connectable);null!=b.geometry&&a.setGeometry(c,this.codec.decode(mxUtils.parseXml(b.geometry).documentElement));null!=b.source&&a.setTerminal(c,a.getCell(b.source),!0);null!=b.target&&a.setTerminal(c,a.getCell(b.target),!1);for(var k in b)this.cellProperties[k]||(c[k]=b[k])}};
+EditorUi.prototype.getPagesForNode=function(a,c){var b=this.editor.extractGraphModel(a,!0);null!=b&&(a=b);for(var b=a.getElementsByTagName(c||"diagram"),f=[],k=0;k<b.length;k++){var h=new DiagramPage(b[k]);this.updatePageRoot(h);f.push(h)}return f};
+EditorUi.prototype.diffPages=function(a,c){for(var b=[],f=[],k={},h={},m={},t=null,p=0;p<c.length;p++)h[c[p].getId()]={page:c[p],prev:t},t=c[p];t=null;for(p=0;p<a.length;p++){var d=a[p].getId(),g=h[d];if(null==g)f.push(d);else{var n=this.diffPage(a[p],g.page),q={};0<Object.keys(n).length&&(q.cells=n);n=this.diffViewState(a[p],g.page);0<Object.keys(n).length&&(q.view=n);if((null!=g.prev?null==t:null!=t)||null!=t&&null!=g.prev&&t.getId()!=g.prev.getId())q.previous=null!=g.prev?g.prev.getId():"";null!=
+g.page.getName()&&a[p].getName()!=g.page.getName()&&(q.name=g.page.getName());0<Object.keys(q).length&&(m[d]=q)}delete h[a[p].getId()];t=a[p]}for(d in h)g=h[d],b.push({data:mxUtils.getXml(g.page.node),previous:null!=g.prev?g.prev.getId():""});0<Object.keys(m).length&&(k[EditorUi.DIFF_UPDATE]=m);0<f.length&&(k[EditorUi.DIFF_REMOVE]=f);0<b.length&&(k[EditorUi.DIFF_INSERT]=b);return k};
+EditorUi.prototype.createCellLookup=function(a,c,b){b=null!=b?b:{};b[a.getId()]={cell:a,prev:c};var f=a.getChildCount();c=null;for(var k=0;k<f;k++){var h=a.getChildAt(k);this.createCellLookup(h,c,b);c=h}return b};
+EditorUi.prototype.diffCellRecursive=function(a,c,b,f,k){f=null!=f?f:{};var h=b[a.getId()];delete b[a.getId()];if(null==h)k.push(a.getId());else{var m=this.diffCell(a,h.cell);if(null!=m.parent||(null!=h.prev?null==c:null!=c)||null!=c&&null!=h.prev&&c.getId()!=h.prev.getId())m.previous=null!=h.prev?h.prev.getId():"";0<Object.keys(m).length&&(f[a.getId()]=m)}h=a.getChildCount();c=null;for(m=0;m<h;m++){var t=a.getChildAt(m);this.diffCellRecursive(t,c,b,f,k);c=t}return f};
+EditorUi.prototype.diffPage=function(a,c){var b=[],f=[],k={};this.updatePageRoot(a);this.updatePageRoot(c);var h=this.createCellLookup(c.root),m=this.diffCellRecursive(a.root,null,h,m,f),t;for(t in h){var p=h[t];b.push(this.getJsonForCell(p.cell,p.prev))}0<Object.keys(m).length&&(k[EditorUi.DIFF_UPDATE]=m);0<f.length&&(k[EditorUi.DIFF_REMOVE]=f);0<b.length&&(k[EditorUi.DIFF_INSERT]=b);return k};
+EditorUi.prototype.diffViewState=function(a,c){var b=a.viewState,f=c.viewState,k={};c==this.currentPage&&(f=this.editor.graph.getViewState());if(null!=b&&null!=f)for(var h in this.viewStateProperties){var m=JSON.stringify(b[h]),t=JSON.stringify(f[h]);m!=t&&(k[h]=t)}return k};
EditorUi.prototype.getCellForJson=function(a){var c=null!=a.geometry?this.codec.decode(mxUtils.parseXml(a.geometry).documentElement):null,b=a.value;null!=a.xmlValue&&(b=mxUtils.parseXml(a.xmlValue).documentElement);c=new mxCell(b,c,a.style);c.connectable=0!=a.connectable;c.collapsed=1==a.collapsed;c.visible=0!=a.visible;c.vertex=1==a.vertex;c.edge=1==a.edge;c.id=a.id;for(var f in a)this.cellProperties[f]||(c[f]=a[f]);return c};
EditorUi.prototype.getJsonForCell=function(a,c){var b={id:a.getId()};a.vertex&&(b.vertex=1);a.edge&&(b.edge=1);a.connectable||(b.connectable=0);null!=a.parent&&(b.parent=a.parent.getId());null!=c&&(b.previous=c.getId());null!=a.source&&(b.source=a.source.getId());null!=a.target&&(b.target=a.target.getId());null!=a.style&&(b.style=a.style);null!=a.geometry&&(b.geometry=mxUtils.getXml(this.codec.encode(a.geometry)));a.collapsed&&(b.collapsed=1);a.visible||(b.visible=0);null!=a.value&&("object"===typeof a.value&&
"number"===typeof a.value.nodeType&&"string"===typeof a.value.nodeName&&"function"===typeof a.value.getAttribute?b.xmlValue=mxUtils.getXml(a.value):b.value=a.value);for(var f in a)this.cellProperties[f]||"function"===typeof a[f]||(b[f]=a[f]);return b};
EditorUi.prototype.diffCell=function(a,c){function b(a){return null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute}var f={};a.vertex!=c.vertex&&(f.vertex=c.vertex?1:0);a.edge!=c.edge&&(f.edge=c.edge?1:0);a.connectable!=c.connectable&&(f.connectable=c.connectable?1:0);if((null!=a.parent?null==c.parent:null!=c.parent)||null!=a.parent&&null!=c.parent&&a.parent.getId()!=c.parent.getId())f.parent=null!=c.parent?c.parent.getId():"";
if((null!=a.source?null==c.source:null!=c.source)||null!=a.source&&null!=c.source&&a.source.getId()!=c.source.getId())f.source=null!=c.source?c.source.getId():"";if((null!=a.target?null==c.target:null!=c.target)||null!=a.target&&null!=c.target&&a.target.getId()!=c.target.getId())f.target=null!=c.target?c.target.getId():"";b(a.value)&&b(c.value)?a.value.isEqualNode(c.value)||(f.xmlValue=mxUtils.getXml(c.value)):a.value!=c.value&&(b(c.value)?f.xmlValue=mxUtils.getXml(c.value):f.value=null!=c.value?
-c.value:null);a.style!=c.style&&(f.style=c.style);a.visible!=c.visible&&(f.visible=c.visible?1:0);a.collapsed!=c.collapsed&&(f.collapsed=c.collapsed?1:0);this.isObjectEqual(a.geometry,c.geometry,new mxGeometry)||(f.geometry=mxUtils.getXml(this.codec.encode(c.geometry)));for(var h in a)this.cellProperties[h]||"function"===typeof a[h]||"function"===typeof c[h]||a[h]==c[h]||(f[h]=void 0===c[h]?null:c[h]);for(h in c)h in a||this.cellProperties[h]||"function"===typeof a[h]||"function"===typeof c[h]||a[h]==
-c[h]||(f[h]=void 0===c[h]?null:c[h]);return f};EditorUi.prototype.isObjectEqual=function(a,c,b){if(null==a&&null==c)return!0;if(null!=a?null==c:null!=c)return!1;var f=function(a,c){return null==b||b[a]!=c?!0===c?1:c:void 0};return JSON.stringify(a,f)==JSON.stringify(c,f)};var mxSettings={currentVersion:17,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
+c.value:null);a.style!=c.style&&(f.style=c.style);a.visible!=c.visible&&(f.visible=c.visible?1:0);a.collapsed!=c.collapsed&&(f.collapsed=c.collapsed?1:0);this.isObjectEqual(a.geometry,c.geometry,new mxGeometry)||(f.geometry=mxUtils.getXml(this.codec.encode(c.geometry)));for(var k in a)this.cellProperties[k]||"function"===typeof a[k]||"function"===typeof c[k]||a[k]==c[k]||(f[k]=void 0===c[k]?null:c[k]);for(k in c)k in a||this.cellProperties[k]||"function"===typeof a[k]||"function"===typeof c[k]||a[k]==
+c[k]||(f[k]=void 0===c[k]?null:c[k]);return f};EditorUi.prototype.isObjectEqual=function(a,c,b){if(null==a&&null==c)return!0;if(null!=a?null==c:null!=c)return!1;var f=function(a,c){return null==b||b[a]!=c?!0===c?1:c:void 0};return JSON.stringify(a,f)==JSON.stringify(c,f)};var mxSettings={currentVersion:17,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
setGridColor:function(a){mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries=
a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins=
a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(a){mxSettings.settings.createTarget=a},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(a){mxSettings.settings.pageFormat=
@@ -8260,30 +8284,30 @@ DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()
DrawioFileSync.prototype.fileChangedNotify=function(){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else var a=this.fileChanged(mxUtils.bind(this,function(a){this.updateStatus()}),mxUtils.bind(this,function(a){this.file.handleFileError(a)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=a}))};
DrawioFileSync.prototype.fileChanged=function(a,c,b){var f=window.setTimeout(mxUtils.bind(this,function(){null!=b&&b()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(f){null!=b&&b()||(this.isValidState()?this.catchup(this.file.getDescriptorEtag(f),this.file.getDescriptorSecret(f),a,c,b):null!=c&&c())}),c):null!=c&&c())}),0);return this.notifyThread=f};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorEtag(a,this.file.getCurrentEtag()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(a,c,b,f,h){if(null==h||!h()){var k=this.file.getCurrentEtag();if(k==a)null!=b&&b();else if(this.isValidState()){var m=0,p=!1,t=mxUtils.bind(this,function(){null!=h&&h()||(k!=this.file.getCurrentEtag()?null!=b&&b():this.isValidState()?mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(a)+(null!=c?"&secret="+encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=
-c.getText().length;if(null==h||!h())if(k!=this.file.getCurrentEtag())null!=b&&b();else if(this.isValidState()){var d=null,n=[],q=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var u=JSON.parse(c.getText());if(null!=u&&0<u.length)for(var v=0;v<u.length;v++){var w=this.stringToObject(u[v]);if(w.v>DrawioFileSync.PROTOCOL){p=!0;q=[];break}else if(w.v===DrawioFileSync.PROTOCOL&&null!=w.d)d=w.d.checksum,q.push(w.d.patch),null!=w.d.details&&(w.d.details.checksum=d,n.push(JSON.stringify(w.d.details)));
-else{p=!0;q=[];break}}}catch(y){q=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,d,a,b,f,h,n)):m<=this.maxCacheReadyRetries&&!p&&401!=c.getStatus()?(m++,this.file.stats.cacheMiss++,window.setTimeout(t,(m+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(b,f,h))}catch(y){null!=f&&f(y)}}else null!=f&&f()})):null!=f&&f())});window.setTimeout(t,this.cacheReadyDelay)}else null!=f&&f()}};
+DrawioFileSync.prototype.catchup=function(a,c,b,f,k){if(null==k||!k()){var h=this.file.getCurrentEtag();if(h==a)null!=b&&b();else if(this.isValidState()){var m=0,t=!1,p=mxUtils.bind(this,function(){null!=k&&k()||(h!=this.file.getCurrentEtag()?null!=b&&b():this.isValidState()?mxUtils.get(this.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(h)+"&to="+encodeURIComponent(a)+(null!=c?"&secret="+encodeURIComponent(c):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=
+c.getText().length;if(null==k||!k())if(h!=this.file.getCurrentEtag())null!=b&&b();else if(this.isValidState()){var d=null,n=[],q=[];if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var u=JSON.parse(c.getText());if(null!=u&&0<u.length)for(var v=0;v<u.length;v++){var w=this.stringToObject(u[v]);if(w.v>DrawioFileSync.PROTOCOL){t=!0;q=[];break}else if(w.v===DrawioFileSync.PROTOCOL&&null!=w.d)d=w.d.checksum,q.push(w.d.patch),null!=w.d.details&&(w.d.details.checksum=d,n.push(JSON.stringify(w.d.details)));
+else{t=!0;q=[];break}}}catch(y){q=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,d,a,b,f,k,n)):m<=this.maxCacheReadyRetries&&!t&&401!=c.getStatus()?(m++,this.file.stats.cacheMiss++,window.setTimeout(p,(m+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(b,f,k))}catch(y){null!=f&&f(y)}}else null!=f&&f()})):null!=f&&f())});window.setTimeout(p,this.cacheReadyDelay)}else null!=f&&f()}};
DrawioFileSync.prototype.reload=function(a,c,b,f){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b,f)};
-DrawioFileSync.prototype.merge=function(a,c,b,f,h,k,m){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.checkPages(this.file.shadowPages,"merge init");this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;if(this.file.ignorePatches(a))this.file.stats.shadowState=this.ui.hashValue(b);
-else{for(k=0;k<a.length;k++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,a[k]);this.file.stats.shadowState=this.ui.hashValue(b);this.file.checkPages(this.file.shadowPages,"merge patched");k={};var p=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,k):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",m,k,"patches",a,"checksum",c==p,c);if(null!=c&&
-c!=p){var t=this.ui.hashValue(this.file.getCurrentEtag()),d=this.ui.hashValue(b);k.inConflictState=this.file.inConflictState;k.invalidChecksum=this.file.invalidChecksum;this.file.checksumError(h,a,"From: "+t+"\nTo: "+d+(null!=m&&0<m.length?"\nDetails: "+m.join(", "):"")+"\nChecksum: "+c+"\nCurrent: "+p+(null!=k?"\nCurrent Details: "+JSON.stringify(k):""),b);return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.stats.lastMergeTime=(new Date).toISOString();this.file.stats.lastMerge=
-m;this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages(this.ui.pages,"merge done");null!=f&&f()}catch(g){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=h&&h(g);try{t=this.ui.hashValue(this.file.getCurrentEtag()),d=this.ui.hashValue(b),this.file.sendErrorReport("Error in merge","From: "+t+"\nTo: "+d+(null!=m&&0<m.length?"\nDetails: "+m.join(", "):"")+"\nChecksum: "+c+"\nPatches:\n"+
+DrawioFileSync.prototype.merge=function(a,c,b,f,k,h,m){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.checkPages(this.file.shadowPages,"merge init");this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;if(this.file.ignorePatches(a))this.file.stats.shadowState=this.ui.hashValue(b);
+else{for(h=0;h<a.length;h++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,a[h]);this.file.stats.shadowState=this.ui.hashValue(b);this.file.checkPages(this.file.shadowPages,"merge patched");h={};var t=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,h):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",m,h,"patches",a,"checksum",c==t,c);if(null!=c&&
+c!=t){var p=this.ui.hashValue(this.file.getCurrentEtag()),d=this.ui.hashValue(b);h.inConflictState=this.file.inConflictState;h.invalidChecksum=this.file.invalidChecksum;this.file.checksumError(k,a,"From: "+p+"\nTo: "+d+(null!=m&&0<m.length?"\nDetails: "+m.join(", "):"")+"\nChecksum: "+c+"\nCurrent: "+t+(null!=h?"\nCurrent Details: "+JSON.stringify(h):""),b);return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.stats.lastMergeTime=(new Date).toISOString();this.file.stats.lastMerge=
+m;this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages(this.ui.pages,"merge done");null!=f&&f()}catch(g){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=k&&k(g);try{p=this.ui.hashValue(this.file.getCurrentEtag()),d=this.ui.hashValue(b),this.file.sendErrorReport("Error in merge","From: "+p+"\nTo: "+d+(null!=m&&0<m.length?"\nDetails: "+m.join(", "):"")+"\nChecksum: "+c+"\nPatches:\n"+
this.file.compressReportData(JSON.stringify(a,null,2)),g)}catch(n){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentEtag(),f=this.objectToString({});mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(f));this.file.stats.bytesSent+=f.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=this.ui.editor.graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(this.ui.editor.graph.decompress(a))};
-DrawioFileSync.prototype.fileSaved=function(a,c,b,f){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var h=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),k={v:EditorUi.VERSION,t:(new Date).toISOString(),ua:navigator.userAgent};f=this.ui.getHashValueForPages(a,
-k);h=this.ui.diffPages(h,a);c=this.file.getDescriptorEtag(c);var m=this.file.getCurrentEtag();k.from=this.ui.hashValue(c);k.to=this.ui.hashValue(m);var k=this.objectToString(this.createMessage({patch:h,checksum:f,details:k})),p=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),t=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=k.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+
-"&to="+encodeURIComponent(m)+"&msg="+encodeURIComponent(p)+(null!=t?"&secret="+encodeURIComponent(t):"")+(k.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(k):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",m,k.length,"bytes","diff",h,"checksum",f)}this.file.shadowPages=a;null!=b&&b()};
+DrawioFileSync.prototype.fileSaved=function(a,c,b,f){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId&&this.isConnected())){var k=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),h={v:EditorUi.VERSION,t:(new Date).toISOString(),ua:navigator.userAgent};
+f=this.ui.getHashValueForPages(a,h);k=this.ui.diffPages(k,a);c=this.file.getDescriptorEtag(c);var m=this.file.getCurrentEtag();h.from=this.ui.hashValue(c);h.to=this.ui.hashValue(m);var h=this.objectToString(this.createMessage({patch:k,checksum:f,details:h})),t=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),p=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=h.length;this.file.stats.msgSent++;mxUtils.post(this.cacheUrl,this.getIdParameters()+
+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(m)+"&msg="+encodeURIComponent(t)+(null!=p?"&secret="+encodeURIComponent(p):"")+(h.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(h):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",m,h.length,"bytes","diff",k,"checksum",f)}this.file.shadowPages=a;null!=b&&b()};
DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&(a+="&sid="+this.pusher.connection.socket_id);return a};DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(a,c,b){this.catchupRetryCount++;if(this.catchupRetryCount<this.maxCatchupRetries)if(this.file.stats.conflicts++,null!=a){var f=this.file.getDescriptorEtag(a);a=this.file.getDescriptorSecret(a);this.catchup(f,a,c,b)}else this.fileChanged(c,b);else this.catchupRetryCount=0,this.file.stats.timeouts++,null!=b&&b({message:mxResources.get("timeout")})};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var a=this.file.getCurrentUser(),c={a:"leave"};null!=a&&(c.name=a.displayName,c.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(c))));this.file.stats.msgSent++}this.stop();null!=this.updateStatusThread&&(window.clearInterval(this.updateStatusThread),this.updateStatusThread=null);null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),
this.onlineListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,"touchstart",this.activityListener),
mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null)};App=function(a,c,b){EditorUi.call(this,a,c,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var f=null;try{f=window.open(a)}catch(p){}null==f||void 0===f?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var f=null;try{f=window.open(a)}catch(t){}null==f||void 0===f?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(f){null!=window.console&&console.log("Plugin Error:",f,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";
-App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";
-App.GOOGLE_APIS="client,drive-share";
+App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";
+App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";App.GOOGLE_APIS="client,drive-share";
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",ac148:"/plugins/cConf-1-4-8.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js",
"import":"/plugins/import.js",replay:"/plugins/replay.js",anon:"/plugins/anonymize.js",tr:"/plugins/trello.js",f5:"/plugins/rackF5.js",tickets:"/plugins/tickets.js",flow:"/plugins/flow.js",webcola:"/plugins/webcola/webcola.js",rnd:"/plugins/random.js",page:"/plugins/page.js"};
App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var c=document.cookie.split(";"),b=0;b<c.length;b++){var f=mxUtils.trim(c[b]);if("MODE="==f.substring(0,5)){a=f.substring(5);break}}null!=a&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie="MODE=; expires="+c.toUTCString(),localStorage.setItem(".mode",a))}return a};
@@ -8296,10 +8320,10 @@ null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db
null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==
urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))},function(a){document.getElementById("geStatus").innerHTML=
"Error loading page. <a>Please try refreshing.</a>";document.getElementById("geStatus").getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";b(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}})}function f(){mxResources.loadDefaultBundle=!1;b(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(a,b,c,d,f){EditorUi.logError(a,b,c,d,f)};if("1"==
-urlParams.embed||"1"==urlParams.lightbox){var h=document.getElementById("geInfo");null!=h&&h.parentNode.removeChild(h)}if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache)mxscript("js/shapes.min.js"),mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),h=document.createElement("iframe"),h.setAttribute("width","0"),h.setAttribute("height","0"),h.setAttribute("src","offline.html"),document.body.appendChild(h);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=
-DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var h=null!=mxSettings.settings?mxSettings.getPlugins():null,k={},m=urlParams.p;App.initPluginCallback();if(null!=m)for(var p=m.split(";"),m=0;m<p.length;m++){var t=App.pluginRegistry[p[m]];null!=t&&null==k[t]?(k[t]=!0,"undefined"===typeof window.drawDevUrl?mxscript(t):mxscript(drawDevUrl+t)):null!=window.console&&console.log("Unknown plugin:",p[m])}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
-null,null,null,mxClient.IS_SVG);if(null!=h&&0<h.length&&"0"!=urlParams.plugins){for(var p=window.location.protocol+"//"+window.location.host,d=!0,m=0;m<h.length&&d;m++)"/"!=h[m].charAt(0)&&h[m].substring(0,p.length)!=p&&(d=!1);if(d||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[h.join("\n")]).replace(/\\n/g,
-"\n")))for(m=0;m<h.length;m++)try{null==k[h[m]]&&(k[t]=!0,mxscript(h[m]))}catch(q){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&
+urlParams.embed||"1"==urlParams.lightbox){var k=document.getElementById("geInfo");null!=k&&k.parentNode.removeChild(k)}if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache)mxscript("js/shapes.min.js"),mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),k=document.createElement("iframe"),k.setAttribute("width","0"),k.setAttribute("height","0"),k.setAttribute("src","offline.html"),document.body.appendChild(k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=
+DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var k=null!=mxSettings.settings?mxSettings.getPlugins():null,h={},m=urlParams.p;App.initPluginCallback();if(null!=m)for(var t=m.split(";"),m=0;m<t.length;m++){var p=App.pluginRegistry[t[m]];null!=p&&null==h[p]?(h[p]=!0,"undefined"===typeof window.drawDevUrl?mxscript(p):mxscript(drawDevUrl+p)):null!=window.console&&console.log("Unknown plugin:",t[m])}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
+null,null,null,mxClient.IS_SVG);if(null!=k&&0<k.length&&"0"!=urlParams.plugins){for(var t=window.location.protocol+"//"+window.location.host,d=!0,m=0;m<k.length&&d;m++)"/"!=k[m].charAt(0)&&k[m].substring(0,t.length)!=t&&(d=!1);if(d||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[k.join("\n")]).replace(/\\n/g,
+"\n")))for(m=0;m<k.length;m++)try{null==h[k[m]]&&(h[p]=!0,mxscript(k[m]))}catch(q){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&
Editor.initMath();if("1"==urlParams.configure){var g=window.opener||window.parent,n=function(a){if(a.source==g)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",n),Editor.configure(b.config,!0),mxSettings.load(),f())}catch(v){null!=window.console&&console.log("Error in configuration: "+v)}};mxEvent.addListener(window,"message",n);g.postMessage(JSON.stringify({event:"load"}),"*")}else f()};mxUtils.extend(App,EditorUi);
App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
@@ -8322,17 +8346,17 @@ this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddi
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
App.prototype.getPusher=function(){null==this.pusher&&"function"===typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0}));return this.pusher};
App.prototype.checkLicense=function(){var a=this.drive.getUser(),c=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=c){var b=c.lastIndexOf("@"),f=c;0<=b&&(f=c.substring(b+1),c=this.crc32(c.substring(0,b))+"@"+f);mxUtils.post("/license","domain="+encodeURIComponent(f)+"&email="+encodeURIComponent(c)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){}))}};
-App.prototype.handleLicense=function(a,c){var b=document.getElementById("geFooter"),f=null;if(null!=b&&null!=a)if(f=a.expiry,null!=a.footer)b.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=f&&"never"!=f){var h=new Date(Date.parse(f)),k=Math.round((h-Date.now())/864E5);if(90>k){var m="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(c);b.style.height="100%";b.style.margin="0px";b.style.display=
-"";0>k?(this.footerHeight=80,b.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+m+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[c,h.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,b.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
-m+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[c,h.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return f};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?a.getData():this.getFileData(!0)};
+App.prototype.handleLicense=function(a,c){var b=document.getElementById("geFooter"),f=null;if(null!=b&&null!=a)if(f=a.expiry,null!=a.footer)b.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=f&&"never"!=f){var k=new Date(Date.parse(f)),h=Math.round((k-Date.now())/864E5);if(90>h){var m="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(c);b.style.height="100%";b.style.margin="0px";b.style.display=
+"";0>h?(this.footerHeight=80,b.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+m+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[c,k.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,b.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
+m+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[c,k.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return f};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?a.getData():this.getFileData(!0)};
App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};
App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var c=this.getRecent();if(null==c)c=[];else for(var b=0;b<c.length;b++)c[b].id==a.id&&c.splice(b,1);null!=c&&(c.unshift(a),c=c.slice(0,10),localStorage.setItem(".recent",JSON.stringify(c)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(c){}return null}};
App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(c){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,c=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,b=0;256>b;b++){c=b;for(var f=0;8>f;f++)c=c&1?3988292384^c>>>1:c>>>1;a[b]=c}return a};
-App.prototype.getThumbnail=function(a,c){var b=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var f=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(f.getStylesheet()),h=f.getGlobalVariable,k=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:h.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!f.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,f),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),p=f.getGraphBounds(),t=a/p.width,t=Math.min(1,Math.min(3*a/(4*p.height),t)),d=Math.floor(p.x),g=Math.floor(p.y);m.setAttribute("width",Math.ceil(t*(p.width+4)));m.setAttribute("height",Math.ceil(t*(p.height+4)));var n=m.getContext("2d");
-n.scale(t,t);n.translate(-d,-g);var q=f.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";n.save();n.fillStyle=q;n.fillRect(d,g,Math.ceil(p.width+4),Math.ceil(p.height+4));n.restore();var u=new mxJsCanvas(m),v=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var w=new mxImageExport;w.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};w.drawText=function(a,
+App.prototype.getThumbnail=function(a,c){var b=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var f=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(f.getStylesheet()),k=f.getGlobalVariable,h=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:k.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(h.root)}if(mxClient.IS_CHROMEAPP||!f.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
+function(a){f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,f),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),t=f.getGraphBounds(),p=a/t.width,p=Math.min(1,Math.min(3*a/(4*t.height),p)),d=Math.floor(t.x),g=Math.floor(t.y);m.setAttribute("width",Math.ceil(p*(t.width+4)));m.setAttribute("height",Math.ceil(p*(t.height+4)));var n=m.getContext("2d");
+n.scale(p,p);n.translate(-d,-g);var q=f.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";n.save();n.fillStyle=q;n.fillRect(d,g,Math.ceil(t.width+4),Math.ceil(t.height+4));n.restore();var u=new mxJsCanvas(m),v=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var w=new mxImageExport;w.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};w.drawText=function(a,
b){};w.drawState(f.getView().getState(f.model.root),v);v.finish(mxUtils.bind(this,function(){w.drawState(f.getView().getState(f.model.root),u);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);c(m)}));b=!0}}catch(y){f!=this.editor.graph&&f.container.parentNode.removeChild(f.container)}return b};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(c,b){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(b)if(isLocalStorage)localStorage.setItem(".mode",c);else if("undefined"!=typeof Storage){var f=new Date;f.setYear(f.getFullYear()+1);document.cookie="MODE="+c+"; expires="+f.toUTCString()}null!=this.appIcon&&(f=this.getCurrentFile(),c=null!=f?f.getMode():null,c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
@@ -8340,8 +8364,8 @@ App.prototype.createBackground=function(){var a=this.createDiv("background");a.s
App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var c=this.getCurrentFile(),b=null!=c?c.getMode():null;b==App.MODE_GOOGLE?null!=c.desc&&null!=c.desc.parents&&0<c.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+c.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):b==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):b==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):b==App.MODE_TRELLO?
this.openLink("https://trello.com/"):b==App.MODE_GITHUB&&(null!=c&&c.constructor==GitHubFile?this.openLink(c.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(a)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}};
App.prototype.getDiagramId=function(){var a=window.location.hash;null!=a&&0<a.length&&(a=a.substring(1));return a};
-App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var c=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(c.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,c,h){this.spinner.stop();null==c&&(c=urlParams.title,h=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,c):new LocalFile(this,a,c,h))}))}}catch(b){}};
+App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var c=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(c.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,c,k){this.spinner.stop();null==c&&(c=urlParams.title,k=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,c):new LocalFile(this,a,c,k))}))}}catch(b){}};
App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:"+App.GOOGLE_APIS,mxUtils.bind(this,function(c){null==gapi.client?(this.mode=this.drive=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.mode=this.drive=null);a()}))}))}))};
App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(a){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
@@ -8349,15 +8373,15 @@ App.prototype.showRefreshDialog=function(a,c){if(!this.showingRefreshDialog&&(th
this.createRealtimeNotice();b.style.left="0";b.style.right="0";b.style.borderRadius="0";b.style.borderLeftStyle="none";b.style.borderRightStyle="none";b.style.marginBottom="26px";b.style.padding="8px 0 8px 0";this.dialog.container.appendChild(b)}};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var c=document.createElement("div");c.className="geAlert";c.style.zIndex=2E9;c.style.left="50%";c.style.top="-100%";mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(c.style,"transition","all 1s ease");c.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("title",mxResources.get("close"));a.innerHTML=
mxResources.get("close");c.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=c.parentNode&&(c.parentNode.removeChild(c),mxEvent.consume(a))});document.body.appendChild(c);window.setTimeout(function(){c.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(c.style,"transition","all 2s ease");c.style.opacity="0";window.setTimeout(function(){null!=c.parentNode&&c.parentNode.removeChild(c)},2E3)},15E3)}};
-App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(p){null!=document.body&&this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
+App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(t){null!=document.body&&this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?decodeURIComponent(b):
this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,f){f.source==b&&a(c)})))}}else if(null==
-this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(d){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var f=this.getDraft(),t=null!=f?f.data:this.getFileData(),c=Editor.useLocalStorage;
-this.createFile(this.defaultFilename,t,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=f&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
+this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(d){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(c);else if(!mxClient.IS_CHROMEAPP){var f=this.getDraft(),p=null!=f?f.data:this.getFileData(),c=Editor.useLocalStorage;
+this.createFile(this.defaultFilename,p,null,null,null,null,null,!0);Editor.useLocalStorage=c;null!=f&&(c=this.getCurrentFile(),null!=c&&c.addUnsavedStatus())}}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
"title"]))}),f=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);var c=4>=a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?a:this.defaultFilename,this.getFileData(),null,
null,null,!0,null,!0);Editor.useLocalStorage=c}else this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c);this.showDialog(b.container,380,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?f(window.opener[c]):
-this.handleError(null,mxResources.get("errorLoadingFile"))}catch(h){this.handleError(h,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){f(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),b)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||
-1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(h){this.handleError(h)}};
+this.handleError(null,mxResources.get("errorLoadingFile"))}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){f(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),b)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||
+1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(k){this.handleError(k)}};
App.prototype.showSplash=function(a){var c=this.getServiceCount(!0,!0),b=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>c||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!a)null==urlParams.create&&b();else{a=4==c?2:3;var f=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();b()}),a);this.showDialog(f.container,3>a?260:300,4<=c?420:300,!0,!1);f.init()}};
App.prototype.addLanguageMenu=function(a,c){var b=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){b=document.createElement("div");b.setAttribute("title",mxResources.get("language"));b.className="geIcon geSprite geSprite-globe";b.style.position="absolute";b.style.cursor="pointer";b.style.bottom="20px";b.style.right="20px";if(c){b.style.direction="rtl";b.style.textAlign="right";b.style.right="24px";var f=document.createElement("span");f.style.display="inline-block";
@@ -8365,64 +8389,64 @@ f.style.fontSize="12px";f.style.margin="5px 24px 0 0";f.style.color="gray";mxUti
c.popup(f.x,f.y+b.offsetHeight,null,a);this.setCurrentMenu(c)}));a.appendChild(b)}return b};
App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var c=this.getPeerForMode(a);if(null!=c)c.pickFile();else if(a==App.MODE_DEVICE&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,
"change",mxUtils.bind(this,function(){null!=b.files&&this.openFiles(b.files)}));b.click()}else{this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var f=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?
-new StorageFile(this,b,c):new LocalFile(this,b,c))}));var h=this.dialog,k=h.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=f;k.apply(h,arguments);null==this.getCurrentFile()&&this.showSplash()})}}};
+new StorageFile(this,b,c):new LocalFile(this,b,c))}));var k=this.dialog,h=k.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=f;h.apply(k,arguments);null==this.getCurrentFile()&&this.showSplash()})}}};
App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var c=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=c&&c.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var b=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
+mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var b=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,c):new LocalLibrary(this,b,c))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=b;window.openFile=null})}else{var f=document.createElement("input");
-f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!=f.files)for(var a=0;a<f.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(f.files[a])}));f.click()}};
-App.prototype.saveLibrary=function(a,c,b,f,h,k,m){f=null!=f?f:this.mode;h=null!=h?h:!1;k=null!=k?k:!1;var p=this.createLibraryDataFromImages(c),t=mxUtils.bind(this,function(a){this.spinner.stop();null!=m&&m();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==b&&f==App.MODE_DEVICE&&(b=new LocalLibrary(this,p,a));if(null==b)this.pickFolder(f,mxUtils.bind(this,function(b){f==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-p,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),t,this.drive.libraryMimeType):f==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,p,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),t,b):f==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,p,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),t,b):f==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,p,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),t,b):f==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,p,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,c)}),t,b):f==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,p,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),t)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(h||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(p);var d=mxUtils.bind(this,
-function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(b,c);null!=m&&m()}),t)});if(a!=b.getTitle()){var g=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&g!=b.getHash()&&(mxSettings.removeCustomLibrary(g),mxSettings.addCustomLibrary(b.getHash()));this.removeLibrarySidebar(g);d()}),t)}else d()}};
-App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var f=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==b||b.isModified()||(b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==b.getTitle()||null==this.mode){var h=null!=b.getTitle()?b.getTitle():this.defaultFilename,k=!mxClient.IS_IOS||!navigator.standalone,m=this.mode,p=this.getServiceCount(!0);
-isLocalStorage&&p++;var t=4>=p?2:6<p?4:3,h=new CreateDialog(this,h,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==m&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,f)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):m!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,
-this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,b,f,null==this.mode,c)})):null!=b&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,k,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,t);this.showDialog(h.container,460,p>t?390:270,!0,!0);h.init()}else this.save(b.getTitle(),f)}};
+f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!=f.files)for(var a=0;a<f.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(f.files[a])}));f.click()}};
+App.prototype.saveLibrary=function(a,c,b,f,k,h,m){f=null!=f?f:this.mode;k=null!=k?k:!1;h=null!=h?h:!1;var t=this.createLibraryDataFromImages(c),p=mxUtils.bind(this,function(a){this.spinner.stop();null!=m&&m();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==b&&f==App.MODE_DEVICE&&(b=new LocalLibrary(this,t,a));if(null==b)this.pickFolder(f,mxUtils.bind(this,function(b){f==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+t,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),p,this.drive.libraryMimeType):f==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,t,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),p,b):f==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,t,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),p,b):f==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,t,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),p,b):f==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,t,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,c)}),p,b):f==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,t,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),p)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(k||this.spinner.spin(document.body,mxResources.get("saving"))){b.setData(t);var d=mxUtils.bind(this,
+function(){b.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);h||this.libraryLoaded(b,c);null!=m&&m()}),p)});if(a!=b.getTitle()){var g=b.getHash();b.rename(a,mxUtils.bind(this,function(a){b.constructor!=LocalLibrary&&g!=b.getHash()&&(mxSettings.removeCustomLibrary(g),mxSettings.addCustomLibrary(b.getHash()));this.removeLibrarySidebar(g);d()}),p)}else d()}};
+App.prototype.saveFile=function(a,c){var b=this.getCurrentFile();if(null!=b){var f=mxUtils.bind(this,function(){this.removeDraft();this.getCurrentFile()==b||b.isModified()||(b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=c&&c()});if(a||null==b.getTitle()||null==this.mode){var k=null!=b.getTitle()?b.getTitle():this.defaultFilename,h=!mxClient.IS_IOS||!navigator.standalone,m=this.mode,t=this.getServiceCount(!0);
+isLocalStorage&&t++;var p=4>=t?2:6<t?4:3,k=new CreateDialog(this,k,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==m&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,f)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):m!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,
+this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,b,f,null==this.mode,c)})):null!=b&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,h,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,p);this.showDialog(k.container,460,t>p?390:270,!0,!0);k.init()}else this.save(b.getTitle(),f)}};
App.prototype.loadTemplate=function(a,c,b){var f=a;this.isCorsEnabledForUrl(f)||(f="t="+(new Date).getTime(),f=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+f);this.loadUrl(f,mxUtils.bind(this,function(f){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(f.substring(f.indexOf(",")+1)),function(a){c(a)},b,a):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,a)?this.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a):this.isLucidChartData(f)?this.convertLucidChart(f,mxUtils.bind(this,function(a){c(a)}),mxUtils.bind(this,function(a){b(a)})):(/(\.png)($|\?)/i.test(a)&&(f=this.extractGraphModelFromPng(f)),c(f))}),b,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};
App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,c,b,f,h,k,m,p){f=p?null:null!=f?f:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var t=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(a){t();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(f==App.MODE_GOOGLE&&null!=this.drive)null==m&&null!=this.stateArg&&null!=this.stateArg.folderId&&(m=this.stateArg.folderId),
-this.drive.insertFile(a,c,m,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,k,h)}),d);else if(f==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,k,h)}),d,!1,m);else if(f==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,k,h)}),d,!1,m);else if(f==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,
-b,k,h)}),d);else if(f==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){t();this.fileCreated(a,b,k,h)}),d,!1,m);else if(f==App.MODE_BROWSER){t();var g=mxUtils.bind(this,function(){var f=new StorageFile(this,c,a);f.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(f,b,k,h)}),d)});null==localStorage.getItem(a)?g():this.confirm(mxResources.get("replaceIt",[a]),g,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else t(),
-this.fileCreated(new LocalFile(this,c,a,null==f),b,k,h)}catch(n){t(),this.handleError(n)}}};
-App.prototype.fileCreated=function(a,c,b,f){var h=window.location.pathname;null!=c&&0<c.length&&(h+="?libs="+c);h=this.getUrl(h);a.getMode()!=App.MODE_DEVICE&&(h+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,m=window.location.protocol+"//"+window.location.hostname+h,p=k,t=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(t=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
-document.body.appendChild(t.container),p=this.decodeNodeIntoGraph(p,t));a.setData(this.createFileData(k,t,a,m));null!=t&&t.container.parentNode.removeChild(t.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var g=this.getCurrentFile();null==b&&null!=g&&(b=!g.isModified()&&null==g.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus();null!=c&&this.sidebar.showEntries(c)}),m=mxUtils.bind(this,
-function(){b||null==g||!g.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=f&&f();null==b||b?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=f&&f(),window.openWindow(h,null,m))});a.constructor==LocalFile?g():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,
+App.prototype.createFile=function(a,c,b,f,k,h,m,t){f=t?null:null!=f?f:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var p=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(a){p();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(f==App.MODE_GOOGLE&&null!=this.drive)null==m&&null!=this.stateArg&&null!=this.stateArg.folderId&&(m=this.stateArg.folderId),
+this.drive.insertFile(a,c,m,mxUtils.bind(this,function(a){p();this.fileCreated(a,b,h,k)}),d);else if(f==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){p();this.fileCreated(a,b,h,k)}),d,!1,m);else if(f==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,c,mxUtils.bind(this,function(a){p();this.fileCreated(a,b,h,k)}),d,!1,m);else if(f==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){p();this.fileCreated(a,
+b,h,k)}),d);else if(f==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){p();this.fileCreated(a,b,h,k)}),d,!1,m);else if(f==App.MODE_BROWSER){p();var g=mxUtils.bind(this,function(){var f=new StorageFile(this,c,a);f.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(f,b,h,k)}),d)});null==localStorage.getItem(a)?g():this.confirm(mxResources.get("replaceIt",[a]),g,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else p(),
+this.fileCreated(new LocalFile(this,c,a,null==f),b,h,k)}catch(n){p(),this.handleError(n)}}};
+App.prototype.fileCreated=function(a,c,b,f){var k=window.location.pathname;null!=c&&0<c.length&&(k+="?libs="+c);k=this.getUrl(k);a.getMode()!=App.MODE_DEVICE&&(k+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var h=a.getData(),h=0<h.length?this.editor.extractGraphModel(mxUtils.parseXml(h).documentElement,!0):null,m=window.location.protocol+"//"+window.location.hostname+k,t=h,p=null;null!=h&&/\.svg$/i.test(a.getTitle())&&(p=this.createTemporaryGraph(this.editor.graph.getStylesheet()),
+document.body.appendChild(p.container),t=this.decodeNodeIntoGraph(t,p));a.setData(this.createFileData(h,p,a,m));null!=p&&p.container.parentNode.removeChild(p.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var g=this.getCurrentFile();null==b&&null!=g&&(b=!g.isModified()&&null==g.getMode());var h=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);b&&a.addAllSavedStatus();null!=c&&this.sidebar.showEntries(c)}),m=mxUtils.bind(this,
+function(){b||null==g||!g.isModified()?h():this.confirm(mxResources.get("allChangesLost"),null,h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=f&&f();null==b||b?m():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=f&&f(),window.openWindow(k,null,m))});a.constructor==LocalFile?g():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,
function(a){d();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,c,b,f,h){this.hideDialog();var k=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var h=localStorage.getItem(a);if(null!=h)this.fileLoaded(new StorageFile(this,h,a)),null!=f&&f();else throw{message:mxResources.get("fileNotFound")};}catch(n){this.handleError(n,
+App.prototype.loadFile=function(a,c,b,f,k){this.hideDialog();var h=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var h=localStorage.getItem(a);if(null!=h)this.fileLoaded(new StorageFile(this,h,a)),null!=f&&f();else throw{message:mxResources.get("fileNotFound")};}catch(n){this.handleError(n,
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=b)this.spinner.stop(),this.fileLoaded(b),null!=f&&f();else if("S"==a.charAt(0)){this.spinner.stop();try{this.loadDescriptor(JSON.parse(this.editor.graph.decompress(a.substring(1))),
f,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0))this.spinner.stop(),h=decodeURIComponent(a.substring(1)),"<"!=h.charAt(0)&&(h=this.editor.graph.decompress(h)),h=new LocalFile(this,h,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),h.getHash=function(){return a},this.fileLoaded(h),null!=f&&f();else if("U"==a.charAt(0)){var d=decodeURIComponent(a.substring(1)),
g=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=d.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var a=mxUtils.bind(this,function(){this.spinner.stop();return null!=this.drive?(this.loadFile("G"+d.substring(31,d.lastIndexOf("&ex")),c,f),!0):!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(d,mxUtils.bind(this,function(b){this.spinner.stop();
if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=d,h=d.lastIndexOf("."),k=f.lastIndexOf("/");h>k&&0<k&&(f=f.substring(k+1,h),h=d.substring(h),this.useCanvasForExport||".png"!=h||(h=".xml"),".svg"===h||".xml"===h||".html"===h||".png"===h)&&(c=f+h)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b)||g()}}),mxUtils.bind(this,function(){g()||(this.spinner.stop(),
this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}))}else h=null,"G"==a.charAt(0)?h=this.drive:"D"==a.charAt(0)?h=this.dropbox:"W"==a.charAt(0)?h=this.oneDrive:"H"==a.charAt(0)?h=this.gitHub:"T"==a.charAt(0)&&(h=this.trello),null==h?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),
-h.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=f&&f()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),m=this.getCurrentFile(),p=mxUtils.bind(this,function(){h||null==m||!m.isModified()?k():
-this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=m&&(window.location.hash=m.getHash())}),k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?p():null!=m&&m.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,p):p()};
+h.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=f&&f()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),m=this.getCurrentFile(),t=mxUtils.bind(this,function(){k||null==m||!m.isModified()?h():
+this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=m&&(window.location.hash=m.getHash())}),h,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?t():null!=m&&m.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,t):t()};
App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?c+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?c+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+mxResources.get("device")+")");return c};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a,c){c||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(b,c){var f=0,k=[],m=mxUtils.bind(this,function(){if(0==f){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=c&&c()}});if(null!=b)for(var p=0;p<b.length;p++){var t=encodeURIComponent(decodeURIComponent(b[p]));mxUtils.bind(this,
-function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){f++;var d=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];k[c]=a;f--;m()}),g=mxUtils.bind(this,function(c){a(b,c);f--;m()});this.pendingLibraries[b]=!0;var h=b.substring(0,1);if("L"==h)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&
-null==b&&(b=this.emptyLibraryXml);null!=b?d(new StorageLibrary(this,b,a)):g()}))}catch(l){g()}}),0);else if("U"==h){var p=decodeURIComponent(b.substring(1));if(!this.isOffline()){h=p;this.isCorsEnabledForUrl(h)||(h="t="+(new Date).getTime(),h=PROXY_URL+"?url="+encodeURIComponent(p)+"&"+h);try{mxUtils.get(h,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{d(new UrlLibrary(this,a.getText(),p))}catch(l){g()}else g()}),function(){g()})}catch(y){g()}}}else{var t=null;"G"==h?
-null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==h?null!=this.gitHub&&null!=this.gitHub.getUser()&&(t=this.gitHub):"T"==h?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==h?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==h&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{d(a)}catch(l){g()}}),function(a){g()}):g(!0)}}})(t,p)}m()});c(mxSettings.getCustomLibraries(),
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a,c){c||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(b,c){var f=0,h=[],m=mxUtils.bind(this,function(){if(0==f){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=h[a]&&this.loadLibrary(h[a]);null!=c&&c()}});if(null!=b)for(var t=0;t<b.length;t++){var p=encodeURIComponent(decodeURIComponent(b[t]));mxUtils.bind(this,
+function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){f++;var d=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];h[c]=a;f--;m()}),g=mxUtils.bind(this,function(c){a(b,c);f--;m()});this.pendingLibraries[b]=!0;var k=b.substring(0,1);if("L"==k)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&
+null==b&&(b=this.emptyLibraryXml);null!=b?d(new StorageLibrary(this,b,a)):g()}))}catch(l){g()}}),0);else if("U"==k){var p=decodeURIComponent(b.substring(1));if(!this.isOffline()){k=p;this.isCorsEnabledForUrl(k)||(k="t="+(new Date).getTime(),k=PROXY_URL+"?url="+encodeURIComponent(p)+"&"+k);try{mxUtils.get(k,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{d(new UrlLibrary(this,a.getText(),p))}catch(l){g()}else g()}),function(){g()})}catch(y){g()}}}else{var t=null;"G"==k?
+null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==k?null!=this.gitHub&&null!=this.gitHub.getUser()&&(t=this.gitHub):"T"==k?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==k?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==k&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{d(a)}catch(l){g()}}),function(a){g()}):g(!0)}}})(p,t)}m()});c(mxSettings.getCustomLibraries(),
function(){c((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();if(null!=a&&("manual"==DrawioFile.SYNC||"auto"==DrawioFile.SYNC)){var c=("manual"==DrawioFile.SYNC||null!=a.sync&&!a.sync.enabled&&"min"!=uiTheme)&&(a.constructor==DriveFile||a.constructor==OneDriveFile)||a.constructor==GitHubFile||EditorUi.isElectronApp;null==this.syncButton&&c?(this.syncButton=document.createElement("div"),this.syncButton.className="geBtn gePrimaryBtn",this.syncButton.style.display=
"inline-block",this.syncButton.style.padding="0 10px 0 10px",this.syncButton.style.marginTop="-4px",this.syncButton.style.height="28px",this.syncButton.style.lineHeight="28px",this.syncButton.style.minWidth="0px",this.syncButton.style.cssFloat="left",this.syncButton.setAttribute("title",mxResources.get("synchronize")+" (Alt+Shift+S)"),mxUtils.write(this.syncButton,mxResources.get("synchronize")),mxEvent.addListener(this.syncButton,"click",mxUtils.bind(this,function(){this.actions.get("synchronize").funct()})),
this.buttonContainer.appendChild(this.syncButton)):null==this.syncButton||c||(this.syncButton.parentNode.removeChild(this.syncButton),this.syncButton=null)}null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight=
"28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),
this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null)}};
-App.prototype.save=function(a,c){var b=this.getCurrentFile(),f=mxResources.get("saving");if(null!=b&&this.spinner.spin(document.body,f)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var f=mxUtils.bind(this,function(){b.handleFileSuccess(!0);null!=c&&c()}),h=mxUtils.bind(this,function(a){b.handleFileError(a,!0)});try{a==b.getTitle()?b.save(!0,f,h):b.saveAs(a,f,h)}catch(k){b.handleFileError(k,!0)}}};
-App.prototype.pickFolder=function(a,c,b){b=null!=b?b:!0;var f=this.spinner.pause();b&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){f();if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(b=a.docs[0].id);c(b)}})):b&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){f();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
-c(a))})):b&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){f();c(a)})):b&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){f();c(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(a,c,b,f,h,k){h==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(c,f?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):h==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(c,a,k,mxUtils.bind(this,function(a){this.spinner.stop()}),
-mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),b,f):h==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(c,f?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):h==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(c,a,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,k,f):h==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(c,f?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):h==App.MODE_BROWSER&&(b=mxUtils.bind(this,function(){localStorage.setItem(c,a)}),null==localStorage.getItem(c)?
+App.prototype.save=function(a,c){var b=this.getCurrentFile(),f=mxResources.get("saving");if(null!=b&&this.spinner.spin(document.body,f)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var f=mxUtils.bind(this,function(){b.handleFileSuccess(!0);null!=c&&c()}),k=mxUtils.bind(this,function(a){b.handleFileError(a,!0)});try{a==b.getTitle()?b.save(!0,f,k):b.saveAs(a,f,k)}catch(h){b.handleFileError(h,!0)}}};
+App.prototype.pickFolder=function(a,c,b,f){b=null!=b?b:!0;var k=this.spinner.pause();b&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){k();if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(b=a.docs[0].id);c(b)}})):b&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){k();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
+c(a))}),f):b&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){k();c(a)})):b&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){k();c(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(a,c,b,f,k,h){k==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(c,f?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):k==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(c,a,h,mxUtils.bind(this,function(a){this.spinner.stop()}),
+mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),b,f):k==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(c,f?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,h):k==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(c,a,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,h,f):k==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(c,f?this.base64ToBlob(a,b):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,h):k==App.MODE_BROWSER&&(b=mxUtils.bind(this,function(){localStorage.setItem(c,a)}),null==localStorage.getItem(c)?
b():this.confirm(mxResources.get("replaceIt",[c]),b))};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var c=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,c);this.fname.setAttribute("title",c+" - "+mxResources.get("rename"))}var c=this.editor.graph,b=a.isEditable()&&!a.invalidChecksum;c.isEnabled()&&!b&&c.reset();c.setEnabled(b);null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?
window.location.hash=a:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null!=this.format&&this.format.refresh()};
-App.prototype.showAuthDialog=function(a,c,b,f){var h=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=b&&b(a,mxUtils.bind(this,function(){this.hideDialog();h()}))}catch(m){this.editor.setStatus(mxUtils.htmlEntities(m.message))}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){null!=f&&f();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,c,b,f,h,k){var m=c;/\.svg$/i.test(m)||(m=m.substring(0,c.lastIndexOf("."))+f);var p=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(p=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var t=new XMLHttpRequest;t.open("GET",a,!0);p||(t.responseType="blob");t.onload=mxUtils.bind(this,function(){var a=null;p?(a=JSON.parse(t.responseText),a=this.base64ToBlob(a.content,
-"application/octet-stream")):a=new Blob([t.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){h(new LocalFile(this,a,m,!0))}),k,c)});t.send()}else{var d=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?h(new LocalFile(this,temp,m,!0)):h(new LocalFile(this,b,c,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),
-mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(new LocalFile(this,a.responseText,m,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),c):h(new LocalFile(this,b,m,!0))}catch(n){null!=k&&k(n)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.substring(0,6);p?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=h){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?
-"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));d(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,d,k,b)}};
+App.prototype.showAuthDialog=function(a,c,b,f){var k=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=b&&b(a,mxUtils.bind(this,function(){this.hideDialog();k()}))}catch(m){this.editor.setStatus(mxUtils.htmlEntities(m.message))}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){null!=f&&f();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(a,c,b,f,k,h){var m=c;/\.svg$/i.test(m)||(m=m.substring(0,c.lastIndexOf("."))+f);var t=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(t=!0);if(/\.v(dx|sdx?)$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var p=new XMLHttpRequest;p.open("GET",a,!0);t||(p.responseType="blob");p.onload=mxUtils.bind(this,function(){var a=null;t?(a=JSON.parse(p.responseText),a=this.base64ToBlob(a.content,
+"application/octet-stream")):a=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){k(new LocalFile(this,a,m,!0))}),h,c)});p.send()}else{var d=mxUtils.bind(this,function(b){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(b),null!=temp?k(new LocalFile(this,temp,m,!0)):k(new LocalFile(this,b,c,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),
+mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?k(new LocalFile(this,a.responseText,m,!0)):null!=h&&h({message:mxResources.get("errorLoadingFile")}))}),c):k(new LocalFile(this,b,m,!0))}catch(n){null!=h&&h(n)}});b=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=b&&"image/"==b.substring(0,6);t?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=k){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(c)?
+"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));d(b)}}else null!=h&&h({code:App.ERROR_UNKNOWN})}),function(){null!=h&&h({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=h&&h({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,d,h,b)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":a==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a}));
@@ -8448,8 +8472,8 @@ else{var c=!1;this.userPanel.innerHTML="";b=document.createElement("img");b.setA
'<table title="User ID: '+b.id+'" style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b.pictureUrl?'<img width="80" height="80" style="margin-right:10px;border-radius:50%;" src="'+b.pictureUrl+'"/>':'<img width="80" height="80" style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=b.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(b.displayName)+"</b><br><small>"+mxUtils.htmlEntities(b.email)+
"</small><br><br><small>"+mxResources.get("googleDrive")+"</small></tr></table>",b=document.createElement("div"),b.style.textAlign="center",b.style.padding="12px",b.style.background="whiteSmoke",b.style.borderTop="1px solid #e0e0e0",b.style.whiteSpace="nowrap",b.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,
mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display="none";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");a.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==
-DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));b=mxUtils.bind(this,function(a,b,f,p){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+
-"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=p?"<br><br><small>"+mxUtils.htmlEntities(p)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=f&&a.appendChild(mxUtils.button(mxResources.get("signOut"),f)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(this.dropbox.getUser(),
+DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));b=mxUtils.bind(this,function(a,b,f,t){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+
+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=t?"<br><br><small>"+mxUtils.htmlEntities(t)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=f&&a.appendChild(mxUtils.button(mxResources.get("signOut"),f)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(this.dropbox.getUser(),
IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==DropboxFile){var b=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",mxUtils.bind(this,function(){var a=
this.getCurrentFile();if(null!=a&&a.constructor==OneDriveFile){var b=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==GitHubFile){var b=
mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==TrelloFile){var b=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=
@@ -8457,13 +8481,13 @@ mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});a.is
null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,
a.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var c=document.createElement("img");mxUtils.setOpacity(c,50);c.style.height="16px";c.style.width="16px";c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,c){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(c))};
-var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,f=a.editor.graph,h=mxUtils.bind(f,f.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),p=("www.draw.io"==
-window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),t=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);
+var c=Menus.prototype.init;Menus.prototype.init=function(){c.apply(this,arguments);var a=this.editorUi,f=a.editor.graph,k=mxUtils.bind(f,f.isEnabled),h=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),t=("www.draw.io"==
+window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),p=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);
mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,
function(b,c,d,f,g,h,k,m,n,p){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,f,g,h,k,!m,n,p)}),!0,null,"svg")}));a.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){var b=new NewDialog(a,null,!1,function(b){a.hideDialog();null!=b&&(f.setSelectionCells(a.importXml(b)),f.scrollCellToVisible(f.getSelectionCell()))},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));a.showDialog(b.container,620,440,!0,!0)}));a.actions.put("exportXml",
new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var g=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),h=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);h.style.marginBottom="16px";
mxEvent.addListener(g,"change",function(){g.checked?h.setAttribute("disabled","disabled"):h.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!h.checked:null,null,!g.checked,c?null:!h.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,c,d,f,g,h){b=new EmbedDialog(a,
-a.createLink(b,c,d,f,g,h,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,f,g,l,h,k,m,n){a.createHtml(b,c,d,f,g,l,h,k,m,n,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(h),f='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+
+a.createLink(b,c,d,f,g,h,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,f,l,g,h,k,m,n){a.createHtml(b,c,d,f,l,g,h,k,m,n,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(h),f='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+
mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",f,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=null==a.pages||1>=a.pages.length,c=document.createElement("div");c.style.whiteSpace="nowrap";
var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(d);var d=function(){h!=this&&this.checked?m.removeAttribute("disabled"):(m.setAttribute("disabled","disabled"),m.checked=!1)},g=146;if(a.pdfPageExport&&!b){var h=a.addRadiobox(c,"pages",mxResources.get("allPages"),!0),g=a.addRadiobox(c,"pages",mxResources.get("currentPage",null,"Current Page"),!1),k=a.addRadiobox(c,"pages",mxResources.get("selectionOnly"),
!1,f.isSelectionEmpty()),m=a.addCheckbox(c,mxResources.get("crop"),!1,!0);mxEvent.addListener(h,"change",d);mxEvent.addListener(g,"change",d);mxEvent.addListener(k,"change",d);g=205}else k=a.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),m=a.addCheckbox(c,mxResources.get("crop"),!f.pageVisible||!a.pdfPageExport,!a.pdfPageExport),a.pdfPageExport||mxEvent.addListener(k,"change",d);c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!k.checked,
@@ -8471,7 +8495,7 @@ b?!0:!h.checked,!m.checked)}),null,mxResources.get("export"));a.showDialog(c.con
f.getSelectionCell(),c=f.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();null!=b&&b.isRevisionHistorySupported()?a.spinner.spin(document.body,mxResources.get("loading"))&&b.getRevisions(mxUtils.bind(this,function(b){a.spinner.stop();b=new RevisionDialog(a,b);a.showDialog(b.container,640,
480,!0,!0);b.init()}),mxUtils.bind(this,function(b){a.handleError(b)})):a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");var d=a.actions.addAction("synchronize",function(){a.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(d.label=mxResources.get("refresh"));a.actions.addAction("upload...",function(){var b=
a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b),null,!0))});"undefined"!==typeof MathJax&&(d=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();f.model.execute(b)}),d.setToggleAction(!0),
-d.setSelectedCallback(function(){return a.isMathEnabled()}),d.isEnabled=h);if(isLocalStorage||mxClient.IS_CHROMEAPP)d=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),d.setToggleAction(!0),d.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var g=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&&
+d.setSelectedCallback(function(){return a.isMathEnabled()}),d.isEnabled=k);if(isLocalStorage||mxClient.IS_CHROMEAPP)d=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),d.setToggleAction(!0),d.setSelectedCallback(function(){return mxSettings.getShowStartScreen()});var g=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&&
a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=f.getSelectionCells(),c=[],d=0;d<b.length;d++)f.getModel().isVertex(b[d])&&c.push(b[d]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,200,250,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var n="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize".split(" ");
a.actions.addAction("copyStyle",function(){var b=f.view.getState(f.getSelectionCell());if(f.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=f.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var d=b[c],g=d.indexOf("=");if(0<=g){var h=d.substring(0,g),d=d.substring(g+1);null==a.copiedStyle[h]&&"none"==d&&(a.copiedStyle[h]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(f.isEnabled()&&!f.isSelectionEmpty()&&
null!=a.copiedStyle){f.getModel().beginUpdate();try{for(var b=f.getSelectionCells(),c=0;c<b.length;c++)for(var d=f.view.getState(b[c]),g=0;g<n.length;g++){var h=n[g],k=a.copiedStyle[h];d.style[h]!=k&&f.setCellStyles(h,k,[b[c]])}}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
@@ -8492,70 +8516,70 @@ this.addMenuItems(b,["feedback"],c);this.addMenuItems(b,["support","-"],c);a.isO
mxUtils.bind(this,function(){a.vRuler.setUnit(mxRuler.prototype.INCHES);a.hRuler.setUnit(mxRuler.prototype.INCHES);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),a.actions.addAction("rulerCM",mxUtils.bind(this,function(){a.vRuler.setUnit(mxRuler.prototype.CENTIMETER);a.hRuler.setUnit(mxRuler.prototype.CENTIMETER);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),a.actions.addAction("rulerPixel",mxUtils.bind(this,
function(){a.vRuler.setUnit(mxRuler.prototype.PIXELS);a.hRuler.setUnit(mxRuler.prototype.PIXELS);a.vRuler.drawRuler(!0);a.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c))})));"1"==urlParams.test&&(mxResources.parse("testDevelop=Develop"),mxResources.parse("showBoundingBox=Show bounding box"),mxResources.parse("createSidebarEntry=Create Sidebar Entry"),mxResources.parse("testChecksum=Checksum"),mxResources.parse("testDiff=Diff"),mxResources.parse("testInspect=Inspect"),
mxResources.parse("testShowConsole=Show Console"),mxResources.parse("testXmlImageExport=XML Image Export"),mxResources.parse("testDownloadRtModel=Export RT model"),mxResources.parse("testImportRtModel=Import RT model"),a.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){f.isSelectionEmpty()||a.showTextDialog("Create Sidebar Entry","sb.createVertexTemplateFromData('"+f.compress(mxUtils.getXml(f.encodeCells(f.getSelectionCells())))+"', width, height, 'Title');")})),a.actions.addAction("showBoundingBox",
-mxUtils.bind(this,function(){var a=f.getGraphBounds(),b=f.view.translate,c=f.view.scale;f.insertVertex(f.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),a.actions.addAction("testChecksum",mxUtils.bind(this,function(){var b=null!=a.pages&&null!=a.getCurrentFile()?a.getCurrentFile().getAnonymizedXmlForPages(a.pages):"",b=new TextareaDialog(a,"Paste Data:",b,function(b){if(0<b.length)try{var c=mxUtils.parseXml(b),d=a.getPagesForNode(c.documentElement,
-"mxGraphModel"),f=a.getHashValueForPages(d);console.log("checksum",d,f);var g=c.getElementsByTagName("*");b={};c={};for(d=0;d<g.length;d++){var l=g[d];null==b[l.id]?b[l.id]=l.id:c[l.id]=l.id}0<c.length&&console.log("duplicates",c)}catch(D){a.handleError(D),console.error(D)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:",
-"",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(z){a.handleError(z),console.error(z)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()}else a.alert("No pages")})),a.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(a,f.getModel())})),a.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=
-new mxImageExport,b=f.getGraphBounds(),c=f.view.scale,d=mxUtils.createXmlDocument(),g=d.createElement("output");d.appendChild(g);d=new mxXmlCanvas2D(g);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var h=0,k=d.save;d.save=function(){h++;k.apply(this,arguments)};var m=d.restore;d.restore=function(){h--;m.apply(this,arguments)};var n=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,h);n.apply(this,arguments);mxLog.debug("leaving shape",a,h)};a.drawState(f.getView().getState(f.model.root),
-d);mxLog.show();mxLog.debug(mxUtils.getXml(g));mxLog.debug("stateCounter",h)})),a.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==a.drive?a.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):a.drive.execute(mxUtils.bind(this,function(){var b=prompt("File ID","");if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b+"/realtime?supportsTeamDrives=true",null,
-"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)};c.send(function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.saveLocalFile(c.getText(),"json-"+b+".txt","text/plain"):a.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),a.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():
-mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testChecksum testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files){var c=
-new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(B){a.handleError(B,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c);this.addMenuItems(b,["-","testShowConsole"],c)}))));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:
-460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(f.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,
-mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,f,g,h,l,k,m,n){a.createHtml(b,c,d,f,g,h,l,k,m,n,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!f){var g=a.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=a.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft=
-"6px";g.appendChild(f);a.document.body.insertBefore(g,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);g.parentNode.removeChild(g)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();
-null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,f,g,h,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,
-!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,f,g,h,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},
-mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=f.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-f.view.translate.y)/f.view.scale)+2,function(b,c,d,f,g,h,l,k){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(m){a.spinner.stop();m=
-new EmbedDialog(a,'<iframe frameborder="0" style="width:'+l+";height:"+k+';" src="'+a.createLink(b,c,d,f,g,h,m)+'"></iframe>');a.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,a.createLink(b,c,d,f,g,h,l));
-a.showDialog(l.container,440,240,!0,!0);l.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSlides...",function(){a.openLink("https://slidesaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||
-mxClient.IS_CHROMEAPP)d=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),d.setToggleAction(!0),d.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});d=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});d.setToggleAction(!0);d.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});
-"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){f.isEditing()&&f.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var d=a.createLoadMessage("save");d.xml=c;b&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},
-a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?
-(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,
-["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){function d(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=h(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");
-g(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var g=mxUtils.bind(this,function(b,c,d){var g=f.view,h=f.getGraphBounds(),l=f.snap(Math.ceil(Math.max(0,h.x/g.scale-g.translate.x)+4*f.gridSize)),k=f.snap(Math.ceil(Math.max(0,(h.y+h.height)/g.scale-g.translate.y)+4*f.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(g){var h=!0,m=mxUtils.bind(this,function(){a.resizeImage(g,b,mxUtils.bind(this,
-function(g,m,n){g=h?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/n)):1;a.importFile(b,c,l,k,Math.round(m*g),Math.round(n*g),d,function(b){a.spinner.stop();f.setSelectionCells(b);f.scrollCellToVisible(f.getSelectionCell())})}),h)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){h=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,l,k,0,0,d,function(b){a.spinner.stop();f.setSelectionCells(b);f.scrollCellToVisible(f.getSelectionCell())})}),
-h=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){d(a.drive)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){d(a.oneDrive)},
-c):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){d(a.dropbox)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){d(a.gitHub)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){d(a.trello)},c):t&&b.addItem(mxResources.get("trello")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,
-mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){g(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}))).isEnabled=h;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");
-mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(c);f=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},
-c);"min"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&b.addCheckmark(f,Editor.checkmarkImage)})));d=this.editorUi.actions.addAction("rename...",
-mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):
-null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}}));d.isEnabled=function(){return this.enabled&&h.apply(this,arguments)};d.visible="1"!=urlParams.embed;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=
-b){var c=a.getCopyFilename(b);b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(c,mxUtils.bind(this,function(c){b.desc=c;b.save(!1,mxUtils.bind(this,function(){a.spinner.stop();b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):a.createFile(c,
-a.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&
-b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){a.openLink("https://app.draw.io/")}));a.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){a.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",
-mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleDocs","googleSlides","googleSites"],c)})));var v=function(b,c,d,f){("plantUml"!=
-f||EditorUi.enablePlantUml&&!a.isOffline())&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||"plantUml"==f){var b=new ParseDialog(a,d,f);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,f),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},w=function(a,b,c,d){var g=f.isMouseInsertPoint()?f.getInsertPoint():f.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(g.x,g.y,b,c),d);a.vertex=!0;f.getModel().beginUpdate();
-try{a=f.addCell(a),f.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{f.getModel().endUpdate()}f.scrollCellToVisible(a);f.setSelectionCell(a);f.container.focus();f.editAfterInsert&&f.startEditing(a);return a};a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,f,g,h,k,m,n,p){b=parseInt(b);
-!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,f,g,h,k,!m,n,p)}),!0,null,"svg")}));a.actions.put("insertText",new Action(mxResources.get("text"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&f.startEditingAtCell(w("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=h;a.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){f.isEnabled()&&
-!f.isCellLocked(f.getDefaultParent())&&w("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=h;a.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&w("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=h;a.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&w("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=
-h;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);a.insertTemplateEnabled&&!a.isOffline()&&this.addMenuItems(b,["insertTemplate","-"],c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));b.addSeparator(c);y(b,c,["fromText",
-"plantUml","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){y(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var f=0;f<d.length;f++)(function(d){var f=d.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(d.title+
-" ("+mxResources.get(f)+")",null,function(){a.loadFile(d.id)},c)})(d[f]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},
-c):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},
-c):t&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=
-b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+
-"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",
-null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):t&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+
-"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):p&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},
-c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):t&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&
-299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(H){a.handleError(H,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);
-mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,
-"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&isLocalStorage&&this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);"1"==urlParams.newTempDlg&&(a.actions.addAction("templates",function(){var b=
-new TemplatesDialog;a.showDialog(b.container,b.width,b.height,!0,!1,null,!1,!0);b.init(a,function(a){console.log(a)},null,null,null,"user",function(a,b){setTimeout(function(){b?a([{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"},{url:"123",
-title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"}]):a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",
-lastModifiedOn:"Yesterday"}]);console.log(b)},1E3)},function(a,b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+
-"Test 4"}])},2E3)},null)}),this.addMenuItem(b,"templates",c))})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,"- pageSetup print - rename save".split(" "),c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],
-c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c);this.addMenuItems(b,["save","-","share"],c);var f=this.addMenuItem(b,"synchronize",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(f,"https://desk.draw.io/support/solutions/articles/16000087947");b.addSeparator(c)}else this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",
-b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||(b.addSeparator(c),f=this.addMenuItem(b,"synchronize",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(f,"https://desk.draw.io/support/solutions/articles/16000087947")),this.addMenuItems(b,["-","save","saveAs"],c),this.addMenuItems(b,["-","rename"],c),a.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
-this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null!=d&&d.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c);this.addMenuItems(b,
-["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a;null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
+mxUtils.bind(this,function(){var a=f.getGraphBounds(),b=f.view.translate,c=f.view.scale;f.insertVertex(f.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),a.actions.addAction("testChecksum",mxUtils.bind(this,function(){var b=null!=a.pages&&null!=a.getCurrentFile()?a.getCurrentFile().getAnonymizedXmlForPages(a.pages):"",b=new TextareaDialog(a,"Paste Data:",b,function(b){if(0<b.length)try{"<"!=b.charAt(0)&&(b=f.decompress(b),console.log("xml",
+b));var c=mxUtils.parseXml(b),d=a.getPagesForNode(c.documentElement,"mxGraphModel"),g=a.getHashValueForPages(d);console.log("checksum",d,g);var h=c.getElementsByTagName("*");b={};c={};for(d=0;d<h.length;d++){var l=h[d];null==b[l.id]?b[l.id]=l.id:c[l.id]=l.id}0<c.length&&console.log("duplicates",c)}catch(D){a.handleError(D),console.error(D)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()})),a.actions.addAction("testDiff",mxUtils.bind(this,
+function(){if(null!=a.pages){var b=new TextareaDialog(a,"Paste Data:","",function(b){if(0<b.length)try{console.log(JSON.stringify(a.diffPages(a.pages,a.getPagesForNode(mxUtils.parseXml(b).documentElement)),null,2))}catch(z){a.handleError(z),console.error(z)}});b.textarea.style.width="600px";b.textarea.style.height="380px";a.showDialog(b.container,620,460,!0,!0);b.init()}else a.alert("No pages")})),a.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(a,f.getModel())})),a.actions.addAction("testXmlImageExport",
+mxUtils.bind(this,function(){var a=new mxImageExport,b=f.getGraphBounds(),c=f.view.scale,d=mxUtils.createXmlDocument(),g=d.createElement("output");d.appendChild(g);d=new mxXmlCanvas2D(g);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var h=0,k=d.save;d.save=function(){h++;k.apply(this,arguments)};var m=d.restore;d.restore=function(){h--;m.apply(this,arguments)};var n=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,h);n.apply(this,arguments);mxLog.debug("leaving shape",
+a,h)};a.drawState(f.getView().getState(f.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(g));mxLog.debug("stateCounter",h)})),a.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==a.drive?a.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):a.drive.execute(mxUtils.bind(this,function(){var b=prompt("File ID","");if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+
+b+"/realtime?supportsTeamDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)};c.send(function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.saveLocalFile(c.getText(),"json-"+b+".txt","text/plain"):a.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),a.actions.addAction("testShowConsole",
+function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testChecksum testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),c);b.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",
+mxUtils.bind(this,function(){if(null!=b.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{a.openLocalFile(mxUtils.getXml(a.drive.convertJsonToXml(JSON.parse(c.target.result).data)),b.files[0].name,!0)}catch(B){a.handleError(B,mxResources.get("errorLoadingFile"))}});c.readAsText(b.files[0])}}));b.click()},c);this.addMenuItems(b,["-","testShowConsole"],c)}))));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,
+640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(f.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+
+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,f,g,h,l,k,m,n){a.createHtml(b,c,d,f,g,h,l,k,m,n,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");
+d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!f){var g=a.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=a.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+
+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);a.document.body.insertBefore(g,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);g.parentNode.removeChild(g)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&
+a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,f,g,h,function(b){a.spinner.stop();
+b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,f,g,h,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);
+b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=f.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-f.view.translate.y)/f.view.scale)+2,function(b,c,d,f,g,h,l,k){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),
+function(m){a.spinner.stop();m=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+l+";height:"+k+';" src="'+a.createLink(b,c,d,f,g,h,m)+'"></iframe>');a.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,f,g,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,
+a.createLink(b,c,d,f,g,h,l));a.showDialog(l.container,440,240,!0,!0);l.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSlides...",function(){a.openLink("https://slidesaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);
+b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)d=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),d.setToggleAction(!0),d.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});d=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});d.setToggleAction(!0);
+d.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){f.isEditing()&&f.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var d=a.createLoadMessage("save");d.xml=c;b&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=
+!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));
+this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE||"undefined"===
+typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){function d(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=l(b.getTitle());/\.svg$/i.test(b.getTitle())&&
+!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");g(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var g=mxUtils.bind(this,function(b,c,d){var g=f.view,h=f.getGraphBounds(),l=f.snap(Math.ceil(Math.max(0,h.x/g.scale-g.translate.x)+4*f.gridSize)),k=f.snap(Math.ceil(Math.max(0,(h.y+h.height)/g.scale-g.translate.y)+4*f.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,
+function(g){var h=!0,m=mxUtils.bind(this,function(){a.resizeImage(g,b,mxUtils.bind(this,function(g,m,n){g=h?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/n)):1;a.importFile(b,c,l,k,Math.round(m*g),Math.round(n*g),d,function(b){a.spinner.stop();f.setSelectionCells(b);f.scrollCellToVisible(f.getSelectionCell())})}),h)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){h=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,
+c,l,k,0,0,d,function(b){a.spinner.stop();f.setSelectionCells(b);f.scrollCellToVisible(f.getSelectionCell())})}),l=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){d(a.drive)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){d(a.oneDrive)},c):t&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){d(a.dropbox)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,
+function(){d(a.gitHub)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){d(a.trello)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.importLocalFile(!1)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.importLocalFile(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+
+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){g(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}))).isEnabled=k;this.put("theme",
+new Menu(mxUtils.bind(this,function(b,c){var d=mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(c);f=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&b.addCheckmark(f,
+Editor.checkmarkImage);f=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");
+mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==d&&b.addCheckmark(f,Editor.checkmarkImage)})));d=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
+b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}}));d.isEnabled=function(){return this.enabled&&
+k.apply(this,arguments)};d.visible="1"!=urlParams.embed;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=a.getCopyFilename(b);b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(c,mxUtils.bind(this,function(c){b.desc=c;b.save(!1,mxUtils.bind(this,function(){a.spinner.stop();
+b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):a.createFile(c,a.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();
+b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}),null,!0)}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){a.openLink("https://app.draw.io/")}));
+a.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){a.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||
+a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleDocs","googleSlides","googleSites"],c)})));var v=function(b,c,d,f){("plantUml"!=f||EditorUi.enablePlantUml&&!a.isOffline())&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||"plantUml"==f){var b=new ParseDialog(a,d,f);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,f),a.showDialog(b.container,620,420,!0,
+!1);b.init()}),c)},w=function(a,b,c,d){var g=f.isMouseInsertPoint()?f.getInsertPoint():f.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(g.x,g.y,b,c),d);a.vertex=!0;f.getModel().beginUpdate();try{a=f.addCell(a),f.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{f.getModel().endUpdate()}f.scrollCellToVisible(a);f.setSelectionCell(a);f.container.focus();f.editAfterInsert&&f.startEditing(a);return a};a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),
+!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,f,g,h,k,m,n,p){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,f,g,h,k,!m,n,p)}),!0,null,"svg")}));a.actions.put("insertText",new Action(mxResources.get("text"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&f.startEditingAtCell(w("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),
+null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&w("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&w("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.put("insertRhombus",
+new Action(mxResources.get("rhombus"),function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&w("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=k;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);a.insertTemplateEnabled&&
+!a.isOffline()&&this.addMenuItems(b,["insertTemplate","-"],c);this.addSubmenu("insertLayout",b,c,mxResources.get("layout"));b.addSeparator(c);y(b,c,["fromText","plantUml","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){y(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("openRecent",new Menu(function(b,c){var d=
+a.getRecent();if(null!=d){for(var f=0;f<d.length;f++)(function(d){var f=d.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(d.title+" ("+mxResources.get(f)+")",null,function(){a.loadFile(d.id)},c)})(d[f]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):t&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);
+null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+
+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,
+80,!0,!0);b.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,
+null,null,null,App.MODE_ONEDRIVE)},c):t&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,
+null,App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,
+null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):h&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):t&&b.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},
+c):p&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=
+b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(H){a.handleError(H,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},
+mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline",
+"layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
+c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);
+"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&isLocalStorage&&this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c);b.addSeparator(c);"1"==urlParams.newTempDlg&&(a.actions.addAction("templates",function(){var b=new TemplatesDialog;a.showDialog(b.container,b.width,b.height,!0,!1,null,!1,!0);b.init(a,function(a){console.log(a)},null,null,null,"user",function(a,b){setTimeout(function(){b?a([{url:"123",
+title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"},{url:"123",title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"}]):a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},{url:"123",
+title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"}]);console.log(b)},1E3)},function(a,b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",
+title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"}])},2E3)},null)}),this.addMenuItem(b,"templates",c))})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",
+b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,"- pageSetup print - rename save".split(" "),c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],
+c);this.addMenuItems(b,["save","-","share"],c);var f=this.addMenuItem(b,"synchronize",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(f,"https://desk.draw.io/support/solutions/articles/16000087947");b.addSeparator(c)}else this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==
+d||d.constructor==LocalFile||(b.addSeparator(c),f=this.addMenuItem(b,"synchronize",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(f,"https://desk.draw.io/support/solutions/articles/16000087947")),this.addMenuItems(b,["-","save","saveAs"],c),this.addMenuItems(b,["-","rename"],c),a.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));
+b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null!=d&&d.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a;null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
function RenamePage(a,c,b){this.ui=a;this.page=c;this.previous=this.name=b}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,c,b){this.ui=a;this.oldIndex=c;this.newIndex=b}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,c,b){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=b&&(c.viewState=b,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,c=this.ui.editor,b=c.graph,f=c.graph.compress(b.zapGremlins(mxUtils.getXml(c.getGraphXml(!0))));mxUtils.setTextContent(a.node,f);a.viewState=b.getViewState();a.root=b.model.root;null!=a.model&&a.model.rootChanged(a.root);b.view.clear(a.root,!0);b.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;b.model.rootChanged(a.root);
@@ -8568,8 +8592,8 @@ null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.page
a.view.translate.x*a.view.scale+c.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+c.viewState.scrollTop),b=c);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&
this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,h=0;h<c.length;h++)if(c[h]instanceof SelectPage||c[h]instanceof RenamePage||c[h]instanceof MovePage||c[h]instanceof mxRootChange){f();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
EditorUi.prototype.restoreViewState=function(a,c,b){a=null!=a?this.getPageById(a.getId()):null;var f=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,c):(f.setViewState(c),this.editor.updateGraphComponents(),f.view.revalidate(),f.sizeDidChange()),f.container.scrollLeft=f.view.translate.x*f.view.scale+c.scrollLeft,f.container.scrollTop=f.view.translate.y*f.view.scale+c.scrollTop,f.restoreSelection(b))};
-Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),b=parseFloat(a.getAttribute("pageScale")),f=parseFloat(a.getAttribute("pageWidth")),h=parseFloat(a.getAttribute("pageHeight")),k=a.getAttribute("background"),m=a.getAttribute("backgroundImage"),m=null!=m&&0<m.length?JSON.parse(m):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),
-shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=k&&0<k.length?k:null,backgroundImage:null!=m?new mxImage(m.src,m.width,m.height):null,pageScale:isNaN(b)?mxGraph.prototype.pageScale:b,pageFormat:isNaN(f)||isNaN(h)?mxSettings.getPageFormat():new mxRectangle(0,0,f,h),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),
+Graph.prototype.createViewState=function(a){var c=a.getAttribute("page"),b=parseFloat(a.getAttribute("pageScale")),f=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),h=a.getAttribute("background"),m=a.getAttribute("backgroundImage"),m=null!=m&&0<m.length?JSON.parse(m):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),
+shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=h&&0<h.length?h:null,backgroundImage:null!=m?new mxImage(m.src,m.width,m.height):null,pageScale:isNaN(b)?mxGraph.prototype.pageScale:b,pageFormat:isNaN(f)||isNaN(k)?mxSettings.getPageFormat():new mxRectangle(0,0,f,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),
selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
Graph.prototype.saveViewState=function(a,c,b){b||(c.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),c.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),c.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),c.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),c.setAttribute("connect",null==a||a.connect?"1":"0"),c.setAttribute("arrows",null==a||a.arrows?"1":"0"),c.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),c.setAttribute("fold",
null==a||a.foldingEnabled?"1":"0"));c.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);b=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=b&&(c.setAttribute("pageWidth",b.width),c.setAttribute("pageHeight",b.height));null!=a&&null!=a.background&&c.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));c.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");c.setAttribute("shadow",
@@ -8581,46 +8605,46 @@ a.pageFormat,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultPar
(this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=
0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0);this.preferPageSize=this.pageBreaksVisible=this.pageVisible};
EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var c=this.editor.extractGraphModel(a.node);if(null!=c){a.graphModelNode=c;a.viewState=this.editor.graph.createViewState(c);var b=new mxCodec(c.ownerDocument);a.root=b.decode(c).root}else a.root=this.editor.graph.model.createRoot()}else null==a.viewState&&(null==a.graphModelNode&&(c=this.editor.extractGraphModel(a.node),null!=c&&(a.graphModelNode=c)),null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode)));
-return a};EditorUi.prototype.selectPage=function(a,c,b){try{this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var f=this.editor.graph.model.createUndoableEdit();f.ignoreEdit=!0;var h=new SelectPage(this,a,b);h.execute();f.add(h);f.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",f))}catch(k){this.handleError(k)}};
+return a};EditorUi.prototype.selectPage=function(a,c,b){try{this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c=null!=c?c:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var f=this.editor.graph.model.createUndoableEdit();f.ignoreEdit=!0;var k=new SelectPage(this,a,b);k.execute();f.add(k);f.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",f))}catch(h){this.handleError(h)}};
EditorUi.prototype.selectNextPage=function(a){var c=this.currentPage;null!=c&&null!=this.pages&&(c=mxUtils.indexOf(this.pages,c),a?this.selectPage(this.pages[mxUtils.mod(c+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(c-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,c){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage();c=null!=c?c:this.pages.length;var b=new ChangePage(this,a,a,c);this.editor.graph.model.execute(b)}return a};
EditorUi.prototype.createPage=function(a){var c=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));c.setName(null!=a?a:this.createPageName());return c};EditorUi.prototype.createPageName=function(){for(var a={},c=0;c<this.pages.length;c++){var b=this.pages[c].getName();null!=b&&0<b.length&&(a[b]=b)}c=this.pages.length;do b=mxResources.get("pageWithNumber",[++c]);while(null!=a[b]);return b};
-EditorUi.prototype.removePage=function(a){try{var c=this.editor.graph,b=mxUtils.indexOf(this.pages,a);if(c.isEnabled()&&0<=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var f=this.currentPage;f==a&&1<this.pages.length?(b==this.pages.length-1?b--:b++,f=this.pages[b]):1>=this.pages.length&&(f=this.insertPage(),c.model.execute(new RenamePage(this,f,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,a,f))}finally{c.model.endUpdate()}}}catch(h){this.handleError(h)}return a};
+EditorUi.prototype.removePage=function(a){try{var c=this.editor.graph,b=mxUtils.indexOf(this.pages,a);if(c.isEnabled()&&0<=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var f=this.currentPage;f==a&&1<this.pages.length?(b==this.pages.length-1?b--:b++,f=this.pages[b]):1>=this.pages.length&&(f=this.insertPage(),c.model.execute(new RenamePage(this,f,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,a,f))}finally{c.model.endUpdate()}}}catch(k){this.handleError(k)}return a};
EditorUi.prototype.duplicatePage=function(a,c){var b=this.editor.graph,f=null;b.isEnabled()&&(b.isEditing()&&b.stopEditing(),f=a.node.cloneNode(!1),f.removeAttribute("id"),f=new DiagramPage(f),f.root=b.cloneCell(b.model.root),f.viewState=b.getViewState(),f.viewState.scale=1,f.viewState.scrollLeft=null,f.viewState.scrollTop=null,f.viewState.currentRoot=null,f.viewState.defaultParent=null,f.setName(c),f=this.insertPage(f,mxUtils.indexOf(this.pages,a)+1));return f};
EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return a};EditorUi.prototype.movePage=function(a,c){this.editor.graph.model.execute(new MovePage(this,a,c))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="12px";c.style.marginLeft="30px";for(var b=this.editor.isChromelessView()?29:59,f=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-b)/this.pages.length)+1),h=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,f){this.pages[b]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",f.style.fontWeight="bold",f.style.borderTopStyle="none"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),h=b):mxEvent.consume(c)}));mxEvent.addListener(f,
-"dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(a){null!=h&&b!=h&&this.movePage(h,b);a.stopPropagation();a.preventDefault()}));c.appendChild(f)})(k,this.createTabForPage(this.pages[k],f,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);
-f=this.createPageMenuTab();this.tabContainer.appendChild(f);f=null;this.isPageInsertTabVisible()&&(f=this.createPageInsertTab(),this.tabContainer.appendChild(f));if(c.clientWidth>this.tabContainer.clientWidth-b){null!=f&&(f.style.position="absolute",f.style.right="0px",c.style.marginRight="30px");var m=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");m.style.position="absolute";m.style.right=this.editor.chromeless?"29px":"55px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var p=this.createControlTab(4,
-"&nbsp;&#10095;");p.style.position="absolute";p.style.right=this.editor.chromeless?"0px":"29px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var t=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=t+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,t-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(p,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(m,
-0<c.scrollLeft?100:50);mxUtils.setOpacity(p,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,t-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(p,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+b)/this.pages.length)+1),k=null,h=0;h<this.pages.length;h++)mxUtils.bind(this,function(b,f){this.pages[b]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",f.style.fontWeight="bold",f.style.borderTopStyle="none"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),k=b):mxEvent.consume(c)}));mxEvent.addListener(f,
+"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(a){null!=k&&b!=k&&this.movePage(k,b);a.stopPropagation();a.preventDefault()}));c.appendChild(f)})(h,this.createTabForPage(this.pages[h],f,this.pages[h]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);
+f=this.createPageMenuTab();this.tabContainer.appendChild(f);f=null;this.isPageInsertTabVisible()&&(f=this.createPageInsertTab(),this.tabContainer.appendChild(f));if(c.clientWidth>this.tabContainer.clientWidth-b){null!=f&&(f.style.position="absolute",f.style.right="0px",c.style.marginRight="30px");var m=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");m.style.position="absolute";m.style.right=this.editor.chromeless?"29px":"55px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var t=this.createControlTab(4,
+"&nbsp;&#10095;");t.style.position="absolute";t.style.right=this.editor.chromeless?"0px":"29px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var p=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=p+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,p-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(t,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(m,
+0<c.scrollLeft?100:50);mxUtils.setOpacity(t,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(t,"click",mxUtils.bind(this,function(a){c.scrollLeft+=Math.max(20,p-20);mxUtils.setOpacity(m,0<c.scrollLeft?100:50);mxUtils.setOpacity(t,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var c=document.createElement("div");c.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";c.style.whiteSpace="nowrap";c.style.boxSizing="border-box";c.style.position="relative";c.style.overflow="hidden";c.style.marginLeft="-1px";c.style.height=this.tabContainer.clientHeight+"px";c.style.padding="8px 4px 8px 4px";c.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";c.style.borderBottomStyle="solid";c.style.backgroundColor=this.tabContainer.style.backgroundColor;
c.style.cursor="move";c.style.color="gray";a&&(mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(c.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(a){c.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return c};
EditorUi.prototype.createControlTab=function(a,c){var b=this.createTab(!0);b.style.paddingTop=a+"px";b.style.cursor="pointer";b.style.width="30px";b.style.lineHeight="30px";b.innerHTML=c;null!=b.firstChild&&null!=b.firstChild.style&&mxUtils.setOpacity(b.firstChild,40);return b};
EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=0;c<this.pages.length;c++)mxUtils.bind(this,
function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var f=this.currentPage;null!=f&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(f)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(f,f.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(f,mxResources.get("copyOf",[f.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var c=mxEvent.getClientX(a),h=mxEvent.getClientY(a);b.popup(c,h,null,a);this.setCurrentMenu(b);
+null,mxUtils.bind(this,function(){this.renamePage(f,f.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(f,mxResources.get("copyOf",[f.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var c=mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(c,k,null,a);this.setCurrentMenu(b);
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,c,b){b=this.createTab(b);var f=a.getName()||mxResources.get("untitled"),h=a.getId();b.setAttribute("title",f+(null!=h?" ("+h+")":""));mxUtils.write(b,f);b.style.maxWidth=c+"px";b.style.width=c+"px";this.addTabListeners(a,b);42<c&&(b.style.textOverflow="ellipsis");return b};
-EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var b=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var f=!1,h=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){f=null!=this.currentMenu;h=a==this.currentPage;b.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(b.isEnabled()&&!b.isMouseDown&&(mxEvent.isTouchEvent(k)&&h||mxEvent.isPopupTrigger(k))){b.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!f){var m=new mxPopupMenu(this.createPageMenu(a));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);this.resetCurrentMenu();m.destroy()});var p=mxEvent.getClientX(k),t=mxEvent.getClientY(k);m.popup(p,t,null,k);this.setCurrentMenu(m,c)}mxEvent.consume(k)}}))};
+EditorUi.prototype.createTabForPage=function(a,c,b){b=this.createTab(b);var f=a.getName()||mxResources.get("untitled"),k=a.getId();b.setAttribute("title",f+(null!=k?" ("+k+")":""));mxUtils.write(b,f);b.style.maxWidth=c+"px";b.style.width=c+"px";this.addTabListeners(a,b);42<c&&(b.style.textOverflow="ellipsis");return b};
+EditorUi.prototype.addTabListeners=function(a,c){mxEvent.disableContextMenu(c);var b=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var f=!1,k=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){f=null!=this.currentMenu;k=a==this.currentPage;b.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(h){if(b.isEnabled()&&!b.isMouseDown&&(mxEvent.isTouchEvent(h)&&k||mxEvent.isPopupTrigger(h))){b.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(h)||!f){var m=new mxPopupMenu(this.createPageMenu(a));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);this.resetCurrentMenu();m.destroy()});var t=mxEvent.getClientX(h),p=mxEvent.getClientY(h);m.popup(t,p,null,h);this.setCurrentMenu(m,c)}mxEvent.consume(h)}}))};
EditorUi.prototype.createPageMenu=function(a,c){return mxUtils.bind(this,function(b,f){b.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),f);b.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),f);b.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,c)}),f);b.addSeparator(f);b.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),f)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,b,f){f.ui=a.ui;return b};a.afterDecode=function(a,b,f){a=f.oldIndex;f.oldIndex=f.newIndex;f.newIndex=a;return f};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,b,f){f.ui=a.ui;return b};a.afterDecode=function(a,b,f){a=f.previous;f.previous=f.name;f.name=a;return f};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,f,h){h.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(h.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&h.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(c,
-a)?b:void 0})),null!=f.relatedPage.root&&a.encodeCell(f.relatedPage.root,h));return h};a.beforeDecode=function(a,c,h){h.ui=a.ui;h.relatedPage=h.ui.getPageById(c.getAttribute("relatedPage"));if(null==h.relatedPage){var b=c.ownerDocument.createElement("diagram");b.setAttribute("id",c.getAttribute("relatedPage"));b.setAttribute("name",c.getAttribute("name"));h.relatedPage=new DiagramPage(b);b=c.getAttribute("viewState");null!=b&&(h.relatedPage.viewState=JSON.parse(b),c.removeAttribute("viewState"));
-c=c.cloneNode(!0);b=c.firstChild;if(null!=b)for(h.relatedPage.root=a.decodeCell(b,!1),h=b.nextSibling,b.parentNode.removeChild(b),b=h;null!=b;){h=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var f=b.getAttribute("id");null==a.lookup(f)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=h}}return c};a.afterDecode=function(a,c,h){h.index=h.previousIndex;return h};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
-"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,f,p,t){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=f.slice(),g=[],h=0;h<f.length;h++){var k=this.view.getState(f[h]),m=null!=k?k.style:this.getCellStyle(f[h]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(f[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=f[h]&&g.push(a);return a==f[h]||!this.model.isCollapsed(a)})),
+(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,f,k){k.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(k.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(c,
+a)?b:void 0})),null!=f.relatedPage.root&&a.encodeCell(f.relatedPage.root,k));return k};a.beforeDecode=function(a,c,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(c.getAttribute("relatedPage"));if(null==k.relatedPage){var b=c.ownerDocument.createElement("diagram");b.setAttribute("id",c.getAttribute("relatedPage"));b.setAttribute("name",c.getAttribute("name"));k.relatedPage=new DiagramPage(b);b=c.getAttribute("viewState");null!=b&&(k.relatedPage.viewState=JSON.parse(b),c.removeAttribute("viewState"));
+c=c.cloneNode(!0);b=c.firstChild;if(null!=b)for(k.relatedPage.root=a.decodeCell(b,!1),k=b.nextSibling,b.parentNode.removeChild(b),b=k;null!=b;){k=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var f=b.getAttribute("id");null==a.lookup(f)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=k}}return c};a.afterDecode=function(a,c,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
+"selectDescendants";var c=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,f,t,p){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=f.slice(),g=[],h=0;h<f.length;h++){var k=this.view.getState(f[h]),m=null!=k?k.style:this.getCellStyle(f[h]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(f[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=f[h]&&g.push(a);return a==f[h]||!this.model.isCollapsed(a)})),
this.model.setCollapsed(f[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);f=d;f=c.apply(this,arguments)}finally{this.model.endUpdate()}return f};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=v.view.getState(a),v.view.getState(a),b="tree"==(null!=
-b?b.style:v.getCellStyle(a)).containerType);return b}function f(a){var b=!1;null!=a&&(a=w.getParent(a),b=v.view.getState(a),v.view.getState(a),b=null!=(null!=b?b.style:v.getCellStyle(a)).childLayout);return b}function p(a){a=v.view.getState(a);if(null!=a){var b=v.getIncomingEdges(a.cell);if(0<b.length&&(b=v.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
-a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function t(a,b){b=null!=b?b:!0;v.model.beginUpdate();try{var c=v.model.getParent(a),d=v.getIncomingEdges(a),f=v.cloneCells([d[0],a]);v.model.setTerminal(f[0],v.model.getTerminal(d[0],!0),!0);var g=p(a),h=c.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-
-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;v.view.currentRoot!=c&&(f[1].geometry.x-=h.x,f[1].geometry.y-=h.y);var k=v.view.getState(a),l=v.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*l;var n=v.getOutgoingEdges(v.model.getTerminal(d[0],!0));if(null!=n){for(var t=g==mxConstants.DIRECTION_SOUTH||
-g==mxConstants.DIRECTION_NORTH,q=h=d=0;q<n.length;q++){var u=v.model.getTerminal(n[q],!1);if(g==p(u)){var w=v.view.getState(u);u!=a&&null!=w&&(t&&b!=w.getCenterX()<k.getCenterX()||!t&&b!=w.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,w)&&(d=10+Math.max(d,(Math.min(m.x+m.width,w.x+w.width)-Math.max(m.x,w.x))/l),h=10+Math.max(h,(Math.min(m.y+m.height,w.y+w.height)-Math.max(m.y,w.y))/l))}}t?h=0:d=0;for(q=0;q<n.length;q++)if(u=v.model.getTerminal(n[q],!1),g==p(u)&&(w=v.view.getState(u),u!=a&&null!=
-w&&(t&&b!=w.getCenterX()<k.getCenterX()||!t&&b!=w.getCenterY()<k.getCenterY()))){var A=[];v.traverse(w.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});v.moveCells(A,(b?1:-1)*d,(b?1:-1)*h)}}}return v.addCells(f,c)}finally{v.model.endUpdate()}}function d(a){v.model.beginUpdate();try{var b=p(a),c=v.getIncomingEdges(a),d=v.cloneCells([c[0],a]);v.model.setTerminal(c[0],d[1],!1);v.model.setTerminal(d[0],d[1],!0);v.model.setTerminal(d[0],a,!1);var f=v.model.getParent(a),g=f.geometry,h=[];v.view.currentRoot!=
+b?b.style:v.getCellStyle(a)).containerType);return b}function f(a){var b=!1;null!=a&&(a=w.getParent(a),b=v.view.getState(a),v.view.getState(a),b=null!=(null!=b?b.style:v.getCellStyle(a)).childLayout);return b}function t(a){a=v.view.getState(a);if(null!=a){var b=v.getIncomingEdges(a.cell);if(0<b.length&&(b=v.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
+a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function p(a,b){b=null!=b?b:!0;v.model.beginUpdate();try{var c=v.model.getParent(a),d=v.getIncomingEdges(a),f=v.cloneCells([d[0],a]);v.model.setTerminal(f[0],v.model.getTerminal(d[0],!0),!0);var g=t(a),h=c.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-
+10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;v.view.currentRoot!=c&&(f[1].geometry.x-=h.x,f[1].geometry.y-=h.y);var k=v.view.getState(a),l=v.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*l;var n=v.getOutgoingEdges(v.model.getTerminal(d[0],!0));if(null!=n){for(var p=g==mxConstants.DIRECTION_SOUTH||
+g==mxConstants.DIRECTION_NORTH,q=h=d=0;q<n.length;q++){var u=v.model.getTerminal(n[q],!1);if(g==t(u)){var w=v.view.getState(u);u!=a&&null!=w&&(p&&b!=w.getCenterX()<k.getCenterX()||!p&&b!=w.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,w)&&(d=10+Math.max(d,(Math.min(m.x+m.width,w.x+w.width)-Math.max(m.x,w.x))/l),h=10+Math.max(h,(Math.min(m.y+m.height,w.y+w.height)-Math.max(m.y,w.y))/l))}}p?h=0:d=0;for(q=0;q<n.length;q++)if(u=v.model.getTerminal(n[q],!1),g==t(u)&&(w=v.view.getState(u),u!=a&&null!=
+w&&(p&&b!=w.getCenterX()<k.getCenterX()||!p&&b!=w.getCenterY()<k.getCenterY()))){var A=[];v.traverse(w.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});v.moveCells(A,(b?1:-1)*d,(b?1:-1)*h)}}}return v.addCells(f,c)}finally{v.model.endUpdate()}}function d(a){v.model.beginUpdate();try{var b=t(a),c=v.getIncomingEdges(a),d=v.cloneCells([c[0],a]);v.model.setTerminal(c[0],d[1],!1);v.model.setTerminal(d[0],d[1],!0);v.model.setTerminal(d[0],a,!1);var f=v.model.getParent(a),g=f.geometry,h=[];v.view.currentRoot!=
f&&(d[1].geometry.x-=g.x,d[1].geometry.y-=g.y);v.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);v.moveCells(h,k,l);return v.addCells(d,f)}finally{v.model.endUpdate()}}function g(a){v.model.beginUpdate();try{var b=v.model.getParent(a),c=v.getIncomingEdges(a),d=v.cloneCells([c[0],
-a]);v.model.setTerminal(d[0],a,!0);var c=v.getOutgoingEdges(a),f=b.geometry,g=[];v.view.currentRoot==b&&(f=new mxRectangle);for(var h=0;h<c.length;h++){var k=v.model.getTerminal(c[h],!1);null!=k&&g.push(k)}var l=v.view.getBounds(g),m=p(a),n=v.view.translate,t=v.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-n.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
-null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-n.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-f.x+40):d[1].geometry.x+(a.geometry.width-f.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/t-n.y+-f.y+10);return v.addCells(d,b)}finally{v.model.endUpdate()}}function n(a,b,c){a=v.getOutgoingEdges(a);c=v.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var f=0;f<a.length;f++){var g=v.view.getState(v.model.getTerminal(a[f],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=p(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():
+a]);v.model.setTerminal(d[0],a,!0);var c=v.getOutgoingEdges(a),f=b.geometry,g=[];v.view.currentRoot==b&&(f=new mxRectangle);for(var h=0;h<c.length;h++){var k=v.model.getTerminal(c[h],!1);null!=k&&g.push(k)}var l=v.view.getBounds(g),m=t(a),n=v.view.translate,p=v.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-n.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
+null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-n.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-f.x+40):d[1].geometry.x+(a.geometry.width-f.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/p-n.y+-f.y+10);return v.addCells(d,b)}finally{v.model.endUpdate()}}function n(a,b,c){a=v.getOutgoingEdges(a);c=v.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var f=0;f<a.length;f++){var g=v.view.getState(v.model.getTerminal(a[f],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=t(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():
c==b?(d=v.getOutgoingEdges(a),null!=d&&0<d.length&&v.setSelectionCell(v.model.getTerminal(d[0],!1))):(c=v.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(v.model.getTerminal(c[0],!0),d,a),c=v.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&v.setSelectionCell(d[c].cell)))))}var u=this,v=u.editor.graph,w=v.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var y=u.menus.createPopupMenu;u.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==v.getSelectionCount()){c=v.getSelectionCell();var f=v.getOutgoingEdges(c);a.addSeparator();null!=f&&0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(v.getSelectionCell())&&(a.addSeparator(),0<v.getIncomingEdges(c).length&&
this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};u.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var a=v.getSelectionCell(),a=v.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(v.model.getTerminal(a[c],!1));v.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var a=v.getSelectionCell(),a=v.getIncomingEdges(a);if(null!=a&&0<a.length&&
@@ -8631,9 +8655,9 @@ a.length)for(f=0;f<a.length;f++)if(b(a[f])){var l=v.getIncomingEdges(k[f]),h=v.g
0;t<a.length;t++)if(b(a[t])||v.model.isEdge(a[t])&&null==v.model.getTerminal(a[t],!0)){g=v.model.getParent(a[t]);break}if(null!=m&&g!=m&&null!=this.view.getState(a[0])){var q=v.getIncomingEdges(a[0]);if(0<q.length){var u=v.view.getState(v.model.getTerminal(q[0],!0));if(null!=u){var w=v.view.getState(m);null!=w&&(c=(w.getCenterX()-u.getCenterX())/v.view.scale,d=(w.getCenterY()-u.getCenterY())/v.view.scale)}}}}l=z.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(t=0;t<l.length;t++)if(this.model.isEdge(l[t]))b(m)&&
0>mxUtils.indexOf(l,this.model.getTerminal(l[t],!0))&&this.model.setTerminal(l[t],m,!0);else if(b(a[t])&&(q=v.getIncomingEdges(a[t]),0<q.length))if(!f)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==v.getIncomingEdges(l[t]).length){n=m;if(null==n||n==v.model.getParent(a[t]))n=v.model.getTerminal(q[0],!0);f=this.cloneCell(q[0]);this.addEdge(f,v.getDefaultParent(),n,l[t])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var E=u.sidebar.dropAndConnect;
u.sidebar.dropAndConnect=function(a,c,d,f){var g=v.model,h=null;g.beginUpdate();try{if(h=E.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(g.isEdge(h[k])&&null==g.getTerminal(h[k],!0)){g.setTerminal(h[k],a,!0);var l=v.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return h}}var C={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},B=
-u.onKeyDown;u.onKeyDown=function(a){try{if(v.isEnabled()&&!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var c=null;0<v.getIncomingEdges(v.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(v.getSelectionCell()):g(v.getSelectionCell()):13==a.which&&(c=t(v.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&v.model.isEdge(c[0])?v.setSelectionCell(v.model.getTerminal(c[0],!1)):v.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
+u.onKeyDown;u.onKeyDown=function(a){try{if(v.isEnabled()&&!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var c=null;0<v.getIncomingEdges(v.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(v.getSelectionCell()):g(v.getSelectionCell()):13==a.which&&(c=p(v.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&v.model.isEdge(c[0])?v.setSelectionCell(v.model.getTerminal(c[0],!1)):v.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var f=C[a.keyCode];null!=f&&(f.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var H=v.connectVertex;v.connectVertex=function(a,c,f,h,k,l){var m=v.getIncomingEdges(a);return b(a)&&0<m.length?(f=p(a),h=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,f==c?g(a):h==k?d(a):t(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):H.call(this,a,c,f,h,k,l)};v.getSubtree=function(a){var c=[a];b(a)&&
+mxEvent.consume(a))}}catch(M){console.log("error",M)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var H=v.connectVertex;v.connectVertex=function(a,c,f,h,k,l){var m=v.getIncomingEdges(a);return b(a)&&0<m.length?(f=t(a),h=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,f==c?g(a):h==k?d(a):p(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):H.call(this,a,c,f,h,k,l)};v.getSubtree=function(a){var c=[a];b(a)&&
!f(a)&&v.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
"18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.destroy;
@@ -8651,21 +8675,21 @@ c.insertEdge(d,!0);f.insertEdge(d,!1);var g=new mxCell("Division",new mxGeometry
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new h(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&
-a.formatWindow.window.fit()}function c(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,266);a.sidebarWindow=new h(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,b.container.clientHeight-30),function(b){function c(c,d){var g=a.menus.get(c),h=f.addMenu(d,mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));h.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&
+a.formatWindow.window.fit()}function c(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,266);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,b.container.clientHeight-30),function(b){function c(c,d){var g=a.menus.get(c),h=f.addMenu(d,mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));h.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
h.className="geTitle";b.appendChild(h);return h}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";d.className="geTitle";d.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var f=new Menubar(a,b);if(!Editor.enableCustomLibraries||
"1"==urlParams.embed&&"1"!=urlParams.libraries)d.style.bottom="0";else if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var g=document.createElement("span");g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("newLibrary"));d.appendChild(g);b.appendChild(d);mxEvent.addListener(d,
"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";g=document.createElement("span");g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("openLibrary"));d.appendChild(g);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=
c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());
a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var f=document.createElement("style");f.type="text/css";f.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane * { font-size:9pt; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(f)}catch(w){}var h=function(a,b,c,d,f,g,h){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";h(a);this.window=new mxWindow(b,a,c,d,f,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(f)}catch(w){}var k=function(a,b,c,d,f,g,h){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";h(a);this.window=new mxWindow(b,a,c,d,f,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=
Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;
-HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var k=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=
-"30px");k.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):p.apply(this,arguments)};var t=App.prototype.updateUserElement;App.prototype.updateUserElement=
-function(){t.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
+HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var h=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=
+"30px");h.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var t=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,c){null!=c.shortcut&&900>b&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",c.shortcut):t.apply(this,arguments)};var p=App.prototype.updateUserElement;App.prototype.updateUserElement=
+function(){p.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
var d=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){d.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
"24px";a.style.width="24px"}null!=this.syncButton&&(a=this.syncButton,a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;",a.className="geToolbarButton",a.innerHTML="",a.style.backgroundImage="url("+Editor.syncImage+")",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.backgroundSize="24px 24px",a.style.height="24px",a.style.width="24px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,
@@ -8703,22 +8727,22 @@ null,640<=b?c("",g.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)"
null],60)}f=h.menus.get("language");null!=f&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=b?(null==M&&(g=p.addMenu("",f.funct),g.setAttribute("title",mxResources.get("language")),g.className="geToolbarButton",g.style.backgroundImage="url("+Editor.globeImage+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.position="absolute",g.style.height="24px",g.style.width="24px",g.style.zIndex="1",g.style.top="11px",g.style.right=
"8px",g.style.cursor="pointer",m.appendChild(g),M=g),h.buttonContainer.style.paddingRight="34px"):(h.buttonContainer.style.paddingRight="4px",null!=M&&(M.parentNode.removeChild(M),M=null))}v.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);var h=this,k=h.editor.graph;h.toolbar=this.createToolbar(h.createDiv("geToolbar"));
h.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(h,m);h.statusContainer=h.createStatusContainer();h.statusContainer.style.position="relative";h.statusContainer.style.maxWidth="";h.statusContainer.style.marginTop="7px";h.statusContainer.style.marginLeft=
-"6px";h.statusContainer.style.color="gray";h.statusContainer.style.cursor="default";h.editor.addListener("statusChanged",mxUtils.bind(this,function(){h.setStatusText(h.editor.getStatus())}));var t=h.descriptorChanged;h.descriptorChanged=function(){t.apply(this,arguments);var a=h.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+
+"6px";h.statusContainer.style.color="gray";h.statusContainer.style.cursor="default";h.editor.addListener("statusChanged",mxUtils.bind(this,function(){h.setStatusText(h.editor.getStatus())}));var q=h.descriptorChanged;h.descriptorChanged=function(){q.apply(this,arguments);var a=h.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+
")":""))}else m.removeAttribute("title")};h.setStatusText(h.editor.getStatus());m.appendChild(h.statusContainer);h.buttonContainer=document.createElement("div");h.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(h.buttonContainer);h.menubarContainer=h.buttonContainer;h.tabContainer=document.createElement("div");h.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";
-var g=h.diagramContainer.parentNode,q=document.createElement("div");q.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";h.diagramContainer.style.top="47px";var u=h.menus.get("viewZoom");if(null!=u){this.tabContainer.style.right="70px";var G=p.addMenu("100%",u.funct);G.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");G.style.whiteSpace="nowrap";G.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";G.style.backgroundPosition="right 6px center";
+var g=h.diagramContainer.parentNode,t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";h.diagramContainer.style.top="47px";var u=h.menus.get("viewZoom");if(null!=u){this.tabContainer.style.right="70px";var G=p.addMenu("100%",u.funct);G.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");G.style.whiteSpace="nowrap";G.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";G.style.backgroundPosition="right 6px center";
G.style.backgroundRepeat="no-repeat";G.style.backgroundColor="#ffffff";G.style.paddingRight="10px";G.style.display="block";G.style.position="absolute";G.style.textDecoration="none";G.style.textDecoration="none";G.style.right="0px";G.style.bottom="0px";G.style.overflow="hidden";G.style.visibility="hidden";G.style.textAlign="center";G.style.color="#000";G.style.fontSize="12px";G.style.color="#707070";G.style.width="59px";G.style.borderTop="1px solid lightgray";G.style.borderLeft="1px solid lightgray";
-G.style.height=parseInt(h.tabContainer.style.height)-1+"px";G.style.lineHeight=parseInt(h.tabContainer.style.height)+1+"px";q.appendChild(G);u=mxUtils.bind(this,function(){G.innerHTML=Math.round(100*h.editor.graph.view.scale)+"%"});h.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);h.editor.addListener("resetGraphView",u);h.editor.addListener("pageSelected",u);var J=h.setGraphEnabled;h.setGraphEnabled=function(){J.apply(this,arguments);null!=this.tabContainer&&(G.style.visibility=this.tabContainer.style.visibility,
-this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}q.appendChild(h.tabContainer);q.appendChild(m);q.appendChild(h.diagramContainer);g.appendChild(q);h.updateTabContainer();var M=null;f();mxEvent.addListener(window,"resize",function(){f();null!=h.sidebarWindow&&h.sidebarWindow.window.fit();null!=h.formatWindow&&h.formatWindow.window.fit();null!=h.actions.outlineWindow&&h.actions.outlineWindow.window.fit();null!=h.actions.layersWindow&&h.actions.layersWindow.window.fit();
-null!=h.menus.tagsWindow&&h.menus.tagsWindow.window.fit();null!=h.menus.findWindow&&h.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,k,m){var f=c.y,h=c.x,d=!1,g=!1;if(null!=this.states&&null!=b&&null!=c){var n=this,q=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);q.x=b.x+h;q.y=b.y+f;q.width=b.width;q.height=b.height;for(var w=[],y=[],l=0;l<this.states.length;l++){var x=this.states[l];x instanceof mxCellState&&(m||!this.graph.isCellSelected(x.cell))&&((q.x>=x.x&&q.x<=x.x+x.width||x.x>=q.x&&x.x<=q.x+q.width)&&(q.y>
+G.style.height=parseInt(h.tabContainer.style.height)-1+"px";G.style.lineHeight=parseInt(h.tabContainer.style.height)+1+"px";t.appendChild(G);u=mxUtils.bind(this,function(){G.innerHTML=Math.round(100*h.editor.graph.view.scale)+"%"});h.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);h.editor.addListener("resetGraphView",u);h.editor.addListener("pageSelected",u);var J=h.setGraphEnabled;h.setGraphEnabled=function(){J.apply(this,arguments);null!=this.tabContainer&&(G.style.visibility=this.tabContainer.style.visibility,
+this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}t.appendChild(h.tabContainer);t.appendChild(m);t.appendChild(h.diagramContainer);g.appendChild(t);h.updateTabContainer();var M=null;f();mxEvent.addListener(window,"resize",function(){f();null!=h.sidebarWindow&&h.sidebarWindow.window.fit();null!=h.formatWindow&&h.formatWindow.window.fit();null!=h.actions.outlineWindow&&h.actions.outlineWindow.window.fit();null!=h.actions.layersWindow&&h.actions.layersWindow.window.fit();
+null!=h.menus.tagsWindow&&h.menus.tagsWindow.window.fit();null!=h.menus.findWindow&&h.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,h,m){var f=c.y,k=c.x,d=!1,g=!1;if(null!=this.states&&null!=b&&null!=c){var n=this,q=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);q.x=b.x+k;q.y=b.y+f;q.width=b.width;q.height=b.height;for(var w=[],y=[],l=0;l<this.states.length;l++){var x=this.states[l];x instanceof mxCellState&&(m||!this.graph.isCellSelected(x.cell))&&((q.x>=x.x&&q.x<=x.x+x.width||x.x>=q.x&&x.x<=q.x+q.width)&&(q.y>
x.y+x.height+4||q.y+q.height+4<x.y)?w.push(x):(q.y>=x.y&&q.y<=x.y+x.height||x.y>=q.y&&x.y<=q.y+q.height)&&(q.x>x.x+x.width+4||q.x+q.width+4<x.x)&&y.push(x))}var z=0,E=0,C=x=0,B=0,H=0,D=0,F=0,I=5*u;if(1<w.length){w.push(q);w.sort(function(a,b){return a.y-b.y});var A=!1,l=q==w[0],u=q==w[w.length-1];if(!l&&!u)for(l=1;l<w.length-1;l++)if(q==w[l]){u=w[l-1];l=w[l+1];x=E=C=(l.y-u.y-u.height-q.height)/2;break}for(l=0;l<w.length-1;l++){var u=w[l],G=w[l+1],J=q==u||q==G,G=G.y-u.y-u.height,A=A|q==u;if(0==E&&
0==z)E=G,z=1;else if(Math.abs(E-G)<=(J||1==l&&A?v:0))z+=1;else if(1<z&&A){w=w.slice(0,l+1);break}else if(3<=w.length-l&&!A)z=0,x=E=0!=C?C:0,w.splice(0,0==l?1:l),l=-1;else break;0!=x||J||(E=x=G)}3==w.length&&w[1]==q&&(x=0)}if(1<y.length){y.push(q);y.sort(function(a,b){return a.x-b.x});A=!1;l=q==y[0];u=q==y[y.length-1];if(!l&&!u)for(l=1;l<y.length-1;l++)if(q==y[l]){u=y[l-1];l=y[l+1];D=H=F=(l.x-u.x-u.width-q.width)/2;break}for(l=0;l<y.length-1;l++){u=y[l];G=y[l+1];J=q==u||q==G;G=G.x-u.x-u.width;A|=q==
u;if(0==H&&0==B)H=G,B=1;else if(Math.abs(H-G)<=(J||1==l&&A?v:0))B+=1;else if(1<B&&A){y=y.slice(0,l+1);break}else if(3<=y.length-l&&!A)B=0,D=H=0!=F?F:0,y.splice(0,0==l?1:l),l=-1;else break;0!=D||J||(H=D=G)}3==y.length&&y[1]==q&&(D=0)}v=function(a,b,c,d){var f=[],g;d?(d=I,g=0):(d=0,g=I);f.push(new mxPoint(a.x-d,a.y-g));f.push(new mxPoint(a.x+d,a.y+g));f.push(a);f.push(b);f.push(new mxPoint(b.x-d,b.y-g));f.push(new mxPoint(b.x+d,b.y+g));if(null!=c)return c.points=f,c;a=new mxPolyline(f,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(n.graph.getView().getOverlayPane());return a};H=function(a,b){if(a&&null!=n.guidesArrHor)for(var c=0;c<n.guidesArrHor.length;c++)n.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=n.guidesArrVer)for(c=0;c<n.guidesArrVer.length;c++)n.guidesArrVer[c].node.style.visibility="hidden"};if(1<B&&B==y.length-1){B=[];F=n.guidesArrHor;d=[];h=0;l=y[0]==q?1:0;A=y[l].y+y[l].height;if(0<D)for(l=0;l<y.length-1;l++)u=
-y[l],G=y[l+1],q==u?(h=G.x-u.width-D,d.push(new mxPoint(h+u.width+I,A)),d.push(new mxPoint(G.x-I,A))):q==G?(d.push(new mxPoint(u.x+u.width+I,A)),h=u.x+u.width+D,d.push(new mxPoint(h-I,A))):(d.push(new mxPoint(u.x+u.width+I,A)),d.push(new mxPoint(G.x-I,A)));else u=y[0],l=y[2],h=u.x+u.width+(l.x-u.x-u.width-q.width)/2,d.push(new mxPoint(u.x+u.width+I,A)),d.push(new mxPoint(h-I,A)),d.push(new mxPoint(h+q.width+I,A)),d.push(new mxPoint(l.x-I,A));for(l=0;l<d.length;l+=2)y=d[l],D=d[l+1],y=v(y,D,null!=F?
-F[l/2]:null),y.node.style.visibility="visible",y.redraw(),B.push(y);for(l=d.length/2;null!=F&&l<F.length;l++)F[l].destroy();n.guidesArrHor=B;h-=b.x;d=!0}else H(!0);if(1<z&&z==w.length-1){B=[];F=n.guidesArrVer;g=[];f=0;l=w[0]==q?1:0;z=w[l].x+w[l].width;if(0<x)for(l=0;l<w.length-1;l++)u=w[l],G=w[l+1],q==u?(f=G.y-u.height-x,g.push(new mxPoint(z,f+u.height+I)),g.push(new mxPoint(z,G.y-I))):q==G?(g.push(new mxPoint(z,u.y+u.height+I)),f=u.y+u.height+x,g.push(new mxPoint(z,f-I))):(g.push(new mxPoint(z,u.y+
-u.height+I)),g.push(new mxPoint(z,G.y-I)));else u=w[0],l=w[2],f=u.y+u.height+(l.y-u.y-u.height-q.height)/2,g.push(new mxPoint(z,u.y+u.height+I)),g.push(new mxPoint(z,f-I)),g.push(new mxPoint(z,f+q.height+I)),g.push(new mxPoint(z,l.y-I));for(l=0;l<g.length;l+=2)y=g[l],D=g[l+1],y=v(y,D,null!=F?F[l/2]:null,!0),y.node.style.visibility="visible",y.redraw(),B.push(y);for(l=g.length/2;null!=F&&l<F.length;l++)F[l].destroy();n.guidesArrVer=B;f-=b.y;g=!0}else H(!1,!0)}if(d||g)return q=new mxPoint(h,f),w=a.call(this,
-b,q,k,m),d&&!g?q.y=w.y:g&&!d&&(q.x=w.x),w.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),w.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;H(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,f=this.guidesArrHor;if(null!=b)for(var m=0;m<b.length;m++)b[m].node.style.visibility=a?"visible":"hidden";if(null!=
-f)for(m=0;m<f.length;m++)f[m].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var k=0;k<a.length;k++)a[k].destroy();this.guidesArrVer=null}if(null!=c){for(k=0;k<c.length;k++)c[k].destroy();this.guidesArrHor=null}}})();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><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 as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(n.graph.getView().getOverlayPane());return a};H=function(a,b){if(a&&null!=n.guidesArrHor)for(var c=0;c<n.guidesArrHor.length;c++)n.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=n.guidesArrVer)for(c=0;c<n.guidesArrVer.length;c++)n.guidesArrVer[c].node.style.visibility="hidden"};if(1<B&&B==y.length-1){B=[];F=n.guidesArrHor;d=[];k=0;l=y[0]==q?1:0;A=y[l].y+y[l].height;if(0<D)for(l=0;l<y.length-1;l++)u=
+y[l],G=y[l+1],q==u?(k=G.x-u.width-D,d.push(new mxPoint(k+u.width+I,A)),d.push(new mxPoint(G.x-I,A))):q==G?(d.push(new mxPoint(u.x+u.width+I,A)),k=u.x+u.width+D,d.push(new mxPoint(k-I,A))):(d.push(new mxPoint(u.x+u.width+I,A)),d.push(new mxPoint(G.x-I,A)));else u=y[0],l=y[2],k=u.x+u.width+(l.x-u.x-u.width-q.width)/2,d.push(new mxPoint(u.x+u.width+I,A)),d.push(new mxPoint(k-I,A)),d.push(new mxPoint(k+q.width+I,A)),d.push(new mxPoint(l.x-I,A));for(l=0;l<d.length;l+=2)y=d[l],D=d[l+1],y=v(y,D,null!=F?
+F[l/2]:null),y.node.style.visibility="visible",y.redraw(),B.push(y);for(l=d.length/2;null!=F&&l<F.length;l++)F[l].destroy();n.guidesArrHor=B;k-=b.x;d=!0}else H(!0);if(1<z&&z==w.length-1){B=[];F=n.guidesArrVer;g=[];f=0;l=w[0]==q?1:0;z=w[l].x+w[l].width;if(0<x)for(l=0;l<w.length-1;l++)u=w[l],G=w[l+1],q==u?(f=G.y-u.height-x,g.push(new mxPoint(z,f+u.height+I)),g.push(new mxPoint(z,G.y-I))):q==G?(g.push(new mxPoint(z,u.y+u.height+I)),f=u.y+u.height+x,g.push(new mxPoint(z,f-I))):(g.push(new mxPoint(z,u.y+
+u.height+I)),g.push(new mxPoint(z,G.y-I)));else u=w[0],l=w[2],f=u.y+u.height+(l.y-u.y-u.height-q.height)/2,g.push(new mxPoint(z,u.y+u.height+I)),g.push(new mxPoint(z,f-I)),g.push(new mxPoint(z,f+q.height+I)),g.push(new mxPoint(z,l.y-I));for(l=0;l<g.length;l+=2)y=g[l],D=g[l+1],y=v(y,D,null!=F?F[l/2]:null,!0),y.node.style.visibility="visible",y.redraw(),B.push(y);for(l=g.length/2;null!=F&&l<F.length;l++)F[l].destroy();n.guidesArrVer=B;f-=b.y;g=!0}else H(!1,!0)}if(d||g)return q=new mxPoint(k,f),w=a.call(this,
+b,q,h,m),d&&!g?q.y=w.y:g&&!d&&(q.x=w.x),w.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),w.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;H(!0,!0);return a.apply(this,arguments)};var c=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){c.call(this,a);var b=this.guidesArrVer,f=this.guidesArrHor;if(null!=b)for(var m=0;m<b.length;m++)b[m].node.style.visibility=a?"visible":"hidden";if(null!=
+f)for(m=0;m<f.length;m++)f[m].node.style.visibility=a?"visible":"hidden"};var b=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){b.call(this);var a=this.guidesArrVer,c=this.guidesArrHor;if(null!=a){for(var h=0;h<a.length;h++)a[h].destroy();this.guidesArrVer=null}if(null!=c){for(h=0;h<c.length;h++)c[h].destroy();this.guidesArrHor=null}}})();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><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 as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;
LucidImporter={};
(function(){function c(a){var b=null!=a.Text?a.Text:null!=a.Value?a.Value:a.Lane_0;null==b&&null!=a.State?null!=a.State.t&&(b=a.State):null==b&&null!=a.Note?null!=a.Note.t&&(b=a.Note):null==b&&null!=a.Title?null!=a.Title.t&&(b=a.Title):null!=a.t&&(b=a);null==b&&null!=a.TextAreas&&null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.t&&(b=a.TextAreas.Text.Value);if(null!=b){if(null!=b.t)return b.t=b.t.replace(/</g,"&lt;"),b.t=b.t.replace(/>/g,"&gt;"),b.t;if(null!=b.Value&&
@@ -9216,12 +9240,12 @@ a.style[mxConstants.STYLE_FILLCOLOR];if(n&&"none"!=n){if(d.appendChild(b("FillFo
10;break;case "1 2":c=3;break;case "1 4":c=17}d.appendChild(b("LinePattern",c,h))}1==a.style[mxConstants.STYLE_SHADOW]&&(d.appendChild(b("ShdwPattern",1,h)),d.appendChild(b("ShdwForegnd","#000000",h)),d.appendChild(b("ShdwForegndTrans",.6,h)),d.appendChild(b("ShapeShdwType",1,h)),d.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",h)),d.appendChild(b("ShapeShdwOffsetY","-0.02946278254943948",h)),d.appendChild(b("ShapeShdwScaleFactor","1",h)),d.appendChild(b("ShapeShdwBlur","0.05555555555555555",
h)),d.appendChild(b("ShapeShdwShow",2,h)));1==a.style[mxConstants.STYLE_FLIPH]&&d.appendChild(b("FlipX",1,h));1==a.style[mxConstants.STYLE_FLIPV]&&d.appendChild(b("FlipY",1,h));1==a.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(f("Rounding",.1*a.cell.geometry.width,h));(a=a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(b("TextBkgnd",a,h))}function h(a,b,d,h,n){var c=l(d,D.XMLNS,"Shape");c.setAttribute("ID",a);c.setAttribute("NameU","Shape"+a);c.setAttribute("LineStyle","0");c.setAttribute("FillStyle",
"0");c.setAttribute("TextStyle","0");a=b.width/2;var A=b.height/2;c.appendChild(f("PinX",b.x+a+(n?0:B.shiftX),d));c.appendChild(f("PinY",h-b.y-A-(n?0:B.shiftY),d));c.appendChild(f("Width",b.width,d));c.appendChild(f("Height",b.height,d));c.appendChild(f("LocPinX",a,d));c.appendChild(f("LocPinY",A,d));return c}function n(a,b){var d=D.ARROWS_MAP[(null==a?"none":a)+"|"+(null==b?"1":b)];return null!=d?d:1}function A(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a?3:9>=a?4:22>=a?5:6}function x(h,c,x,E,m){var w=
-c.view.getState(h,!0);if(null==w)return null;c=l(x,D.XMLNS,"Shape");var z=g(h.id);c.setAttribute("ID",z);c.setAttribute("NameU","Dynamic connector."+z);c.setAttribute("Name","Dynamic connector."+z);c.setAttribute("Type","Shape");c.setAttribute("Master","4");var p=B.state,z=w.absolutePoints,I=w.cellBounds,G=I.width/2,F=I.height/2;c.appendChild(f("PinX",I.x+G,x));c.appendChild(f("PinY",E-I.y-F,x));c.appendChild(f("Width",I.width,x));c.appendChild(f("Height",I.height,x));c.appendChild(f("LocPinX",G,
-x));c.appendChild(f("LocPinY",F,x));B.newEdge(c,w,x);G=function(a,b){var d=a.x,h=a.y,d=d*p.scale-I.x+p.dx+(m?0:B.shiftX),h=(b?0:I.height)-h*p.scale+I.y-p.dy-(m?0:B.shiftY);return{x:d,y:h}};F=G(z[0],!0);c.appendChild(f("BeginX",I.x+F.x,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));c.appendChild(f("BeginY",E-I.y+F.y,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));F=G(z[z.length-1],!0);c.appendChild(f("EndX",I.x+F.x,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));c.appendChild(f("EndY",
-E-I.y+F.y,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));c.appendChild(b("BegTrigger","2",x,h.source?"_XFTRIGGER(Sheet."+g(h.source.id)+"!EventXFMod)":null));c.appendChild(b("EndTrigger","2",x,h.target?"_XFTRIGGER(Sheet."+g(h.target.id)+"!EventXFMod)":null));c.appendChild(b("ConFixedCode","6",x));c.appendChild(b("LayerMember","0",x));d(w,c,x);E=w.style[mxConstants.STYLE_STARTSIZE];h=n(w.style[mxConstants.STYLE_STARTARROW],w.style[mxConstants.STYLE_STARTFILL]);c.appendChild(b("BeginArrow",h,
-x));c.appendChild(b("BeginArrowSize",A(E),x));E=w.style[mxConstants.STYLE_ENDSIZE];h=n(w.style[mxConstants.STYLE_ENDARROW],w.style[mxConstants.STYLE_ENDFILL]);c.appendChild(b("EndArrow",h,x));c.appendChild(b("EndArrowSize",A(E),x));null!=w.text&&w.text.checkBounds()&&(B.save(),w.text.paint(B),B.restore());w=l(x,D.XMLNS,"Section");w.setAttribute("N","Geometry");w.setAttribute("IX","0");for(h=0;h<z.length;h++)E=G(z[h]),w.appendChild(a(0==h?"MoveTo":"LineTo",h+1,E.x,E.y,x));w.appendChild(b("NoFill",
-"1",x));w.appendChild(b("NoLine","0",x));c.appendChild(w);return c}function E(a,b,n,c,f,A){var m=a.geometry;if(null!=m){m.relative&&f&&(m=m.clone(),m.x*=f.width,m.y*=f.height,m.relative=0);f=g(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){c=h(f+"10000",m,n,c,A);c.setAttribute("Type","Group");A=l(n,D.XMLNS,"Shapes");B.save();B.translate(-m.x,-m.y);f=m.clone();f.x=0;f.y=0;a.setGeometry(f);a.treatAsSingle=!0;f=E(a,b,n,m.height,m,!0);a.treatAsSingle=!1;a.setGeometry(m);A.appendChild(f);for(var w=0;w<
-a.children.length;w++)f=E(a.children[w],b,n,m.height,m,!0),A.appendChild(f);c.appendChild(A);B.restore();return c}return a.vertex?(c=h(f,m,n,c,A),a=b.view.getState(a,!0),d(a,c,n),B.newShape(c,a,n),null!=a.text&&a.text.checkBounds()&&(B.save(),a.text.paint(B),B.restore()),null!=a.shape&&a.shape.checkBounds()&&(B.save(),a.shape.paint(B),B.restore()),c.appendChild(B.getShapeGeo()),B.endShape(),c.setAttribute("Type",B.getShapeType()),c):x(a,b,n,c,A)}return null}function w(a,b){var d=mxUtils.createXmlDocument(),
+c.view.getState(h,!0);if(null==w||null==w.absolutePoints||null==w.cellBounds)return null;c=l(x,D.XMLNS,"Shape");var z=g(h.id);c.setAttribute("ID",z);c.setAttribute("NameU","Dynamic connector."+z);c.setAttribute("Name","Dynamic connector."+z);c.setAttribute("Type","Shape");c.setAttribute("Master","4");var p=B.state,z=w.absolutePoints,I=w.cellBounds,G=I.width/2,F=I.height/2;c.appendChild(f("PinX",I.x+G,x));c.appendChild(f("PinY",E-I.y-F,x));c.appendChild(f("Width",I.width,x));c.appendChild(f("Height",
+I.height,x));c.appendChild(f("LocPinX",G,x));c.appendChild(f("LocPinY",F,x));B.newEdge(c,w,x);G=function(a,b){var d=a.x,h=a.y,d=d*p.scale-I.x+p.dx+(m?0:B.shiftX),h=(b?0:I.height)-h*p.scale+I.y-p.dy-(m?0:B.shiftY);return{x:d,y:h}};F=G(z[0],!0);c.appendChild(f("BeginX",I.x+F.x,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));c.appendChild(f("BeginY",E-I.y+F.y,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));F=G(z[z.length-1],!0);c.appendChild(f("EndX",I.x+F.x,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));
+c.appendChild(f("EndY",E-I.y+F.y,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));c.appendChild(b("BegTrigger","2",x,h.source?"_XFTRIGGER(Sheet."+g(h.source.id)+"!EventXFMod)":null));c.appendChild(b("EndTrigger","2",x,h.target?"_XFTRIGGER(Sheet."+g(h.target.id)+"!EventXFMod)":null));c.appendChild(b("ConFixedCode","6",x));c.appendChild(b("LayerMember","0",x));d(w,c,x);E=w.style[mxConstants.STYLE_STARTSIZE];h=n(w.style[mxConstants.STYLE_STARTARROW],w.style[mxConstants.STYLE_STARTFILL]);c.appendChild(b("BeginArrow",
+h,x));c.appendChild(b("BeginArrowSize",A(E),x));E=w.style[mxConstants.STYLE_ENDSIZE];h=n(w.style[mxConstants.STYLE_ENDARROW],w.style[mxConstants.STYLE_ENDFILL]);c.appendChild(b("EndArrow",h,x));c.appendChild(b("EndArrowSize",A(E),x));null!=w.text&&w.text.checkBounds()&&(B.save(),w.text.paint(B),B.restore());w=l(x,D.XMLNS,"Section");w.setAttribute("N","Geometry");w.setAttribute("IX","0");for(h=0;h<z.length;h++)E=G(z[h]),w.appendChild(a(0==h?"MoveTo":"LineTo",h+1,E.x,E.y,x));w.appendChild(b("NoFill",
+"1",x));w.appendChild(b("NoLine","0",x));c.appendChild(w);return c}function E(a,b,n,c,f,A){var m=a.geometry;if(null!=m){m.relative&&f&&(m=m.clone(),m.x*=f.width,m.y*=f.height,m.relative=0);f=g(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){c=h(f+"10000",m,n,c,A);c.setAttribute("Type","Group");A=l(n,D.XMLNS,"Shapes");B.save();B.translate(-m.x,-m.y);f=m.clone();f.x=0;f.y=0;a.setGeometry(f);a.treatAsSingle=!0;f=E(a,b,n,m.height,m,!0);a.treatAsSingle=!1;a.setGeometry(m);null!=f&&A.appendChild(f);for(var w=
+0;w<a.getChildCount();w++)f=E(a.children[w],b,n,m.height,m,!0),null!=f&&A.appendChild(f);c.appendChild(A);B.restore();return c}return a.vertex?(c=h(f,m,n,c,A),a=b.view.getState(a,!0),d(a,c,n),B.newShape(c,a,n),null!=a.text&&a.text.checkBounds()&&(B.save(),a.text.paint(B),B.restore()),null!=a.shape&&a.shape.checkBounds()&&(B.save(),a.shape.paint(B),B.restore()),c.appendChild(B.getShapeGeo()),B.endShape(),c.setAttribute("Type",B.getShapeType()),c):x(a,b,n,c,A)}return null}function w(a,b){var d=mxUtils.createXmlDocument(),
h=l(d,D.XMLNS,"PageContents");h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",D.XMLNS);h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",D.XMLNS_R);var n=l(d,D.XMLNS,"Shapes");h.appendChild(n);var c=a.model,f=a.view.translate,A=a.view.scale,x=a.getGraphBounds();B.shiftX=0;B.shiftY=0;if(x.x/A<f.x||x.y/A<f.y)B.shiftX=Math.ceil((f.x-x.x/A)/a.pageFormat.width)*a.pageFormat.width,B.shiftY=Math.ceil((f.y-x.y/A)/a.pageFormat.height)*a.pageFormat.height;B.save();B.translate(-f.x,-f.y);B.scale(1/
A);B.newPage();var A=a.getDefaultParent(),m;for(m in c.cells)f=c.cells[m],f.parent==A&&(f=E(f,a,d,b.pageHeight),null!=f&&n.appendChild(f));n=l(d,D.XMLNS,"Connects");h.appendChild(n);for(m in c.cells)f=c.cells[m],f.edge&&(f.source&&(A=l(d,D.XMLNS,"Connect"),A.setAttribute("FromSheet",g(f.id)),A.setAttribute("FromCell","BeginX"),A.setAttribute("ToSheet",g(f.source.id)),n.appendChild(A)),f.target&&(A=l(d,D.XMLNS,"Connect"),A.setAttribute("FromSheet",g(f.id)),A.setAttribute("FromCell","EndX"),A.setAttribute("ToSheet",
g(f.target.id)),n.appendChild(A)));d.appendChild(h);B.restore();return d}function z(a,b,d,h){a.file(b,(h?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(d))}function I(a,d,h){var n=mxUtils.createXmlDocument(),c=mxUtils.createXmlDocument(),A=l(n,D.XMLNS,"Pages");A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",D.XMLNS);A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",D.XMLNS_R);var x=l(c,D.RELS_XMLNS,"Relationships"),E=1,m;for(m in d){var w="page"+E+".xml",
@@ -9230,7 +9254,7 @@ g=l(n,D.XMLNS,"Page");g.setAttribute("ID",E-1);g.setAttribute("NameU",m);g.setAt
D.PAGES_TYPE);g.setAttribute("Target",w);x.appendChild(g);z(a,D.VISIO_PAGES+w,d[m]);E++}n.appendChild(A);c.appendChild(x);z(a,D.VISIO_PAGES+"pages.xml",n);z(a,D.VISIO_PAGES+"_rels/pages.xml.rels",c)}function G(a,b){var d=D.VISIO_PAGES_RELS+"page"+b+".xml.rels",h=mxUtils.createXmlDocument(),n=l(h,D.RELS_XMLNS,"Relationships"),c=l(h,D.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml");
n.appendChild(c);var f=B.images;if(0<f.length)for(var A=0;A<f.length;A++)c=l(h,D.RELS_XMLNS,"Relationship"),c.setAttribute("Type",D.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(A+2)),c.setAttribute("Target","../media/"+f[A]),n.appendChild(c);h.appendChild(n);z(a,d,h)}var D=this,B=new mxVsdxCanvas2D,F={},C=1;this.exportCurrentDiagrams=function(){try{if(c.spinner.spin(document.body,mxResources.get("exporting"))){var a=new JSZip;B.init(a);F={};C=1;var b={},d={},h=null!=c.pages?c.pages.length:1;if(null!=
c.pages){for(var n=c.editor.graph.getSelectionCells(),f=c.currentPage,A=0;A<c.pages.length;A++){var x=c.pages[A];c.currentPage!=x&&c.selectPage(x,!0);var E=x.getName(),g=c.editor.graph,l=m(g);b[E]=w(g,l);G(a,A+1);d[E]=l}f!=c.currentPage&&c.selectPage(f,!0);c.editor.graph.setSelectionCells(n)}else g=c.editor.graph,l=m(g),E="Page1",b[E]=w(g,l),G(a,1),d[E]=l;p(a,h);I(a,b,d);b=function(){a.generateAsync({type:"base64"}).then(function(a){c.spinner.stop();var b=c.getBaseFilename();c.saveData(b+".vsdx",
-"vsdx",a,"application/vnd.visio2013",!0)})};0<B.filesLoading?B.onFilesLoaded=b:b()}return!0}catch(fb){return console.log(fb),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";
+"vsdx",a,"application/vnd.visio2013",!0)})};0<B.filesLoading?B.onFilesLoaded=b:b()}return!0}catch(fb){return console.log(fb),c.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";
VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/";
VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(c){this.filesLoading=0;this.zip=c};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(c){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,c):this.xmlDoc.createElement(c)};
mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var c=this.createElt("Section");c.setAttribute("N","Geometry");c.setAttribute("IX",this.geoIndex++);this.geoSec=c;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(c,p,l){this.geoIndex=0;this.shape=c;this.cellState=p;this.xmGeo=p.cell.geometry;this.xmlDoc=l;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index d169817e..85d4e097 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -167,9 +167,10 @@ App.DROPBOX_URL = 'js/dropbox/Dropbox-sdk.min.js';
App.DROPINS_URL = 'https://www.dropbox.com/static/api/2/dropins.js';
/**
- * Sets the delay for autosave in milliseconds. Default is 2000.
+ * OneDrive Client JS (file/folder picker). This is a slightly modified version to allow using accessTokens
+ * But it doesn't work for IE11, so we fallback to the original one
*/
-App.ONEDRIVE_URL = 'https://js.live.net/v7.2/OneDrive.js';
+App.ONEDRIVE_URL = mxClient.IS_IE11? 'https://js.live.net/v7.2/OneDrive.js' : 'js/onedrive/OneDrive.js';
/**
* Trello URL
@@ -4184,7 +4185,7 @@ App.prototype.save = function(name, done)
* if a valid folder was chosen for a mode that supports it. No callback
* is made if no folder was chosen for a mode that supports it.
*/
-App.prototype.pickFolder = function(mode, fn, enabled)
+App.prototype.pickFolder = function(mode, fn, enabled, direct)
{
enabled = (enabled != null) ? enabled : true;
var resume = this.spinner.pause();
@@ -4221,7 +4222,7 @@ App.prototype.pickFolder = function(mode, fn, enabled)
folderId = OneDriveFile.prototype.getIdOf(files.value[0]);
fn(folderId);
}
- }));
+ }), direct);
}
else if (enabled && mode == App.MODE_GITHUB && this.gitHub != null)
{
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index ff87cbeb..296f6fde 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -193,6 +193,16 @@ var StorageDialog = function(editorUi, fn, rowLimit)
fn();
}));
}
+ else if (mode == App.MODE_ONEDRIVE && editorUi.spinner.spin(document.body, mxResources.get('authorizing')))
+ {
+ // Tries immediate authentication
+ editorUi.oneDrive.checkToken(mxUtils.bind(this, function()
+ {
+ editorUi.spinner.stop();
+ editorUi.setMode(mode, cb.checked);
+ fn();
+ }));
+ }
else
{
editorUi.setMode(mode, cb.checked);
@@ -234,9 +244,9 @@ var StorageDialog = function(editorUi, fn, rowLimit)
}
}, 30000);
- editorUi.addListener('clientLoaded', mxUtils.bind(this, function()
+ editorUi.addListener('clientLoaded', mxUtils.bind(this, function(sender, evt)
{
- if (editorUi[clientName] != null)
+ if (editorUi[clientName] != null && evt.getProperty('client') == editorUi[clientName])
{
window.clearTimeout(timeout);
mxUtils.setOpacity(label, 100);
@@ -9411,3 +9421,69 @@ TemplatesDialog.prototype.init = function(editorUi, callback, cancelCallback,
editorUi.hideDialog(true);
});
};
+
+
+/**
+ * Constructs a new popup opener button dialog.
+ */
+var BtnDialog = function(editorUi, peer, btnLbl, fn)
+{
+ var div = document.createElement('div');
+ div.style.textAlign = 'center';
+
+ var hd = document.createElement('p');
+ hd.style.fontSize = '16pt';
+ hd.style.padding = '0px';
+ hd.style.margin = '0px';
+ hd.style.color = 'gray';
+
+ mxUtils.write(hd, mxResources.get('done'));
+
+ var service = 'Unknown';
+
+ var img = document.createElement('img');
+ img.setAttribute('border', '0');
+ img.setAttribute('align', 'absmiddle');
+ img.style.marginRight = '10px';
+
+ if (peer == editorUi.drive)
+ {
+ service = mxResources.get('googleDrive');
+ img.src = IMAGE_PATH + '/google-drive-logo-white.svg';
+ }
+ else if (peer == editorUi.dropbox)
+ {
+ service = mxResources.get('dropbox');
+ img.src = IMAGE_PATH + '/dropbox-logo-white.svg';
+ }
+ else if (peer == editorUi.oneDrive)
+ {
+ service = mxResources.get('oneDrive');
+ img.src = IMAGE_PATH + '/onedrive-logo-white.svg';
+ }
+ else if (peer == editorUi.gitHub)
+ {
+ service = mxResources.get('github');
+ img.src = IMAGE_PATH + '/github-logo-white.svg';
+ }
+ else if (peer == editorUi.trello)
+ {
+ service = mxResources.get('trello');
+ img.src = IMAGE_PATH + '/trello-logo-white.svg';
+ }
+
+ var p = document.createElement('p');
+ mxUtils.write(p, mxResources.get('authorizedIn', [service], 'You are now authorized in {1}'));
+
+ var button = mxUtils.button(btnLbl, fn);
+
+ button.insertBefore(img, button.firstChild);
+ button.style.marginTop = '6px';
+ button.className = 'geBigButton';
+
+ div.appendChild(hd);
+ div.appendChild(p);
+ div.appendChild(button);
+
+ this.container = div;
+}; \ No newline at end of file
diff --git a/src/main/webapp/js/diagramly/DrawioClient.js b/src/main/webapp/js/diagramly/DrawioClient.js
index 18aa07ef..2e726b72 100644
--- a/src/main/webapp/js/diagramly/DrawioClient.js
+++ b/src/main/webapp/js/diagramly/DrawioClient.js
@@ -49,6 +49,7 @@ DrawioClient.prototype.clearPersistentToken = function()
if (isLocalStorage)
{
localStorage.removeItem('.' + this.cookieName);
+ sessionStorage.removeItem('.' + this.cookieName);
}
else if (typeof(Storage) != 'undefined')
{
@@ -61,13 +62,18 @@ DrawioClient.prototype.clearPersistentToken = function()
/**
* Authorizes the client, gets the userId and calls <open>.
*/
-DrawioClient.prototype.getPersistentToken = function()
+DrawioClient.prototype.getPersistentToken = function(trySessionStorage)
{
var token = null;
if (isLocalStorage)
{
token = localStorage.getItem('.' + this.cookieName);
+
+ if (token == null && trySessionStorage)
+ {
+ token = sessionStorage.getItem('.' + this.cookieName);
+ }
}
if (token == null && typeof(Storage) != 'undefined')
@@ -110,19 +116,26 @@ DrawioClient.prototype.getPersistentToken = function()
/**
* Authorizes the client, gets the userId and calls <open>.
*/
-DrawioClient.prototype.setPersistentToken = function(token)
+DrawioClient.prototype.setPersistentToken = function(token, sessionOnly)
{
if (token != null)
{
if (isLocalStorage)
{
- localStorage.setItem('.' + this.cookieName, token);
+ if (sessionOnly)
+ {
+ sessionStorage.setItem('.' + this.cookieName, token);
+ }
+ else
+ {
+ localStorage.setItem('.' + this.cookieName, token);
+ }
}
else if (typeof(Storage) != 'undefined')
{
var expiration = new Date();
expiration.setYear(expiration.getFullYear() + 10);
- var cookie = this.cookieName + '=' + token +'; path=/; expires=' + expiration.toUTCString();
+ var cookie = this.cookieName + '=' + token + '; path=/' + (sessionOnly? '' : '; expires=' + expiration.toUTCString());
if (document.location.protocol.toLowerCase() == 'https')
{
diff --git a/src/main/webapp/js/diagramly/DrawioFile.js b/src/main/webapp/js/diagramly/DrawioFile.js
index 0f0d17f2..2c5f77bf 100644
--- a/src/main/webapp/js/diagramly/DrawioFile.js
+++ b/src/main/webapp/js/diagramly/DrawioFile.js
@@ -28,6 +28,7 @@ DrawioFile = function(ui, data)
lastMerge: 0, /* details of the last successful merge */
lastMergeTime: 0, /* timestamp of the last call to merge */
lastOpenTime: 0, /* timestamp of the last call to open */
+ lastIgnored: 0, /* timestamp of the last ignored mergeFile */
shadowState: 0, /* current etag hash for shadow */
opened: 0, /* number of calls to open */
closed: 0, /* number of calls to close */
@@ -245,68 +246,93 @@ DrawioFile.prototype.mergeFile = function(file, success, error, diffShadow)
this.checkPages(shadow, 'mergeFile init');
// Loads new document as shadow document
- this.shadowPages = this.ui.getPagesForNode(
+ var pages = this.ui.getPagesForNode(
mxUtils.parseXml(file.data).
documentElement)
-
- // Creates a patch for backup if the checksum fails
- this.backupPatch = (this.isModified()) ?
- this.ui.diffPages(shadow,
- this.ui.pages) : null;
-
- // Patches the current document
- var patches = [this.ui.diffPages((diffShadow != null) ?
- diffShadow : shadow, this.shadowPages)];
-
- if (!this.ignorePatches(patches))
- {
- // Patching previous shadow to verify checksum
- var patched = this.ui.patchPages(shadow, patches[0]);
- this.stats.shadowState = this.ui.hashValue(file.getCurrentEtag());
- this.checkPages(patched, 'mergeFile patched');
- var patchedDetails = {};
- var checksum = this.ui.getHashValueForPages(patched, patchedDetails);
- var currentDetails = {};
- var current = this.ui.getHashValueForPages(this.shadowPages, currentDetails);
-
- if (urlParams['test'] == '1')
- {
- EditorUi.debug('File.mergeFile', [this],
- 'backup', this.backupPatch,
- 'patches', patches,
- 'checksum', current == checksum, checksum);
- }
+ if (pages != null && pages.length > 0)
+ {
+ this.shadowPages = pages;
+
+ // Creates a patch for backup if the checksum fails
+ this.backupPatch = (this.isModified()) ?
+ this.ui.diffPages(shadow,
+ this.ui.pages) : null;
- if (checksum != null && checksum != current)
+ // Patches the current document
+ var patches = [this.ui.diffPages((diffShadow != null) ?
+ diffShadow : shadow, this.shadowPages)];
+
+ if (!this.ignorePatches(patches))
{
- var data = this.compressReportData(this.getAnonymizedXmlForPages(patched));
+ // Patching previous shadow to verify checksum
+ var patched = this.ui.patchPages(shadow, patches[0]);
+ this.stats.shadowState = this.ui.hashValue(file.getCurrentEtag());
+ this.checkPages(patched, 'mergeFile patched');
- this.checksumError(error, patches,
- ((patchedDetails != null) ? ('Details: ' +
- JSON.stringify(patchedDetails)) : '') +
- '\nChecksum: ' + checksum +
- '\nCurrent: ' + current +
- ((currentDetails != null) ? ('\nCurrent Details: ' +
- JSON.stringify(currentDetails)) : '') +
- '\nPatched:\n' + data);
+ var patchedDetails = {};
+ var checksum = this.ui.getHashValueForPages(patched, patchedDetails);
+ var currentDetails = {};
+ var current = this.ui.getHashValueForPages(this.shadowPages, currentDetails);
- // Abnormal termination
- return;
+ if (urlParams['test'] == '1')
+ {
+ EditorUi.debug('File.mergeFile', [this],
+ 'backup', this.backupPatch,
+ 'patches', patches,
+ 'checksum', current == checksum, checksum);
+ }
+
+ if (checksum != null && checksum != current)
+ {
+ var data = this.compressReportData(this.getAnonymizedXmlForPages(patched));
+
+ this.checksumError(error, patches,
+ ((patchedDetails != null) ? ('Details: ' +
+ JSON.stringify(patchedDetails)) : '') +
+ '\nChecksum: ' + checksum +
+ '\nCurrent: ' + current +
+ ((currentDetails != null) ? ('\nCurrent Details: ' +
+ JSON.stringify(currentDetails)) : '') +
+ '\nPatched:\n' + data);
+
+ // Abnormal termination
+ return;
+ }
+ else
+ {
+ this.patch(patches,
+ (DrawioFile.LAST_WRITE_WINS) ?
+ this.backupPatch : null);
+ this.checkPages(this.ui.pages, 'mergeFile done');
+ }
}
else
{
- this.patch(patches,
- (DrawioFile.LAST_WRITE_WINS) ?
- this.backupPatch : null);
- this.checkPages(this.ui.pages, 'mergeFile done');
+ this.stats.shadowState = this.ui.hashValue(file.getCurrentEtag());
}
}
else
{
- this.stats.shadowState = this.ui.hashValue(file.getCurrentEtag());
+ try
+ {
+ // Report only once per session
+ if (this.stats.lastIgnored == 0)
+ {
+ this.sendErrorReport('Ignored empty pages in mergeFile',
+ 'File Data: ' + this.compressReportData(
+ this.ui.anonymizeString(file.data),
+ null, 500));
+ }
+
+ this.stats.lastIgnored = new Date().toISOString();
+ }
+ catch (e2)
+ {
+ // ignore
+ }
}
-
+
this.invalidChecksum = false;
this.inConflictState = false;
this.setDescriptor(file.getDescriptor());
@@ -462,7 +488,7 @@ DrawioFile.prototype.checksumError = function(error, patches, details, etag)
'Checksum Error',
((details != null) ? (details) : '') +
'\n\nPatches:\n' + json +
- ((remote != null) ? ('\n\nHeadRevision:\n' + remote) : ''),
+ ((remote != null) ? ('\n\nMaster:\n' + remote) : ''),
err, 70000);
});
@@ -1690,8 +1716,8 @@ DrawioFile.prototype.fileSaved = function(savedData, lastDesc, success, error)
try
{
this.sendErrorReport('Error in fileSaved',
- 'SavedData:\n' + this.compressReportData(
- this.ui.anonymizeString(savedData), 5000), e);
+ 'Saved Data:\n' + this.compressReportData(
+ this.ui.anonymizeString(savedData), null, 500), e);
}
catch (e2)
{
@@ -1918,4 +1944,4 @@ DrawioFile.prototype.destroy = function()
this.sync.destroy();
this.sync = null;
}
-};
+}; \ No newline at end of file
diff --git a/src/main/webapp/js/diagramly/DrawioFileSync.js b/src/main/webapp/js/diagramly/DrawioFileSync.js
index 77b52729..155113d7 100644
--- a/src/main/webapp/js/diagramly/DrawioFileSync.js
+++ b/src/main/webapp/js/diagramly/DrawioFileSync.js
@@ -1100,7 +1100,7 @@ DrawioFileSync.prototype.fileSaved = function(pages, lastDesc, success, error)
{
this.start();
- if (this.channelId != null)
+ if (this.channelId != null && this.isConnected())
{
// Computes diff and checksum
var shadow = (this.file.shadowPages != null) ?
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 5301aed4..c2b117aa 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -6533,10 +6533,12 @@
{
if (!noErrorHandling)
{
- this.handleError(e, mxResources.get('invalidOrMissingFile'));
+ this.handleError(e);
+ }
+ else
+ {
+ throw e;
}
-
- throw e;
}
return cells;
@@ -6680,7 +6682,12 @@
{
try
{
- new VsdxExport(this).exportCurrentDiagrams();
+ var expSuccess = new VsdxExport(this).exportCurrentDiagrams();
+
+ if (!expSuccess)
+ {
+ this.handleError({message: mxResources.get('unknownError')});
+ }
}
catch (e)
{
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 7221140f..5c6530b1 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -937,7 +937,7 @@
mxResources.parse('testDevelop=Develop');
mxResources.parse('showBoundingBox=Show bounding box');
mxResources.parse('createSidebarEntry=Create Sidebar Entry');
- mxResources.parse('testChecksum=Checksum');
+ mxResources.parse('testCheckFile=Check File');
mxResources.parse('testDiff=Diff');
mxResources.parse('testInspect=Inspect');
mxResources.parse('testShowConsole=Show Console');
@@ -965,7 +965,7 @@
'fillColor=none;strokeColor=red;');
}));
- editorUi.actions.addAction('testChecksum', mxUtils.bind(this, function()
+ editorUi.actions.addAction('testCheckFile', mxUtils.bind(this, function()
{
var xml = (editorUi.pages != null && editorUi.getCurrentFile() != null) ?
editorUi.getCurrentFile().getAnonymizedXmlForPages(editorUi.pages) : '';
@@ -977,34 +977,53 @@
{
try
{
+ if (newValue.charAt(0) != '<')
+ {
+ newValue = graph.decompress(newValue);
+ console.log('xml', newValue);
+ }
+
var doc = mxUtils.parseXml(newValue);
var pages = editorUi.getPagesForNode(doc.documentElement, 'mxGraphModel');
- var checksum = editorUi.getHashValueForPages(pages);
- console.log('checksum', pages, checksum);
- // Checks for duplicates
- var all = doc.getElementsByTagName('*');
- var allIds = {};
- var dups = {};
-
- for (var i = 0; i < all.length; i++)
+ if (pages != null && pages.length > 0)
{
- var el = all[i];
+ var checksum = editorUi.getHashValueForPages(pages);
+ console.log('checksum', pages, checksum);
+ }
+ else
+ {
+ // Checks for duplicates
+ var all = doc.getElementsByTagName('*');
+ var allIds = {};
+ var dups = {};
- if (allIds[el.id] == null)
+ for (var i = 0; i < all.length; i++)
{
- allIds[el.id] = el.id;
+ var el = all[i];
+
+ if (el.id != null)
+ {
+ if (allIds[el.id] == null)
+ {
+ allIds[el.id] = el.id;
+ }
+ else
+ {
+ dups[el.id] = el.id;
+ }
+ }
+ }
+
+ if (Object.keys(dups).length > 0)
+ {
+ console.log('duplicates', dups);
}
else
{
- dups[el.id] = el.id;
+ console.log('no duplicates');
}
}
-
- if (dups.length > 0)
- {
- console.log('duplicates', dups);
- }
}
catch (e)
{
@@ -1178,7 +1197,7 @@
this.put('testDevelop', new Menu(mxUtils.bind(this, function(menu, parent)
{
this.addMenuItems(menu, ['createSidebarEntry', 'showBoundingBox', '-',
- 'testChecksum', 'testDiff', '-', 'testInspect', '-',
+ 'testCheckFile', 'testDiff', '-', 'testInspect', '-',
'testXmlImageExport', '-', 'testDownloadRtModel'], parent);
menu.addItem(mxResources.get('testImportRtModel') + '...', null, function()
@@ -2029,7 +2048,7 @@
editorUi.handleError(resp);
}));
}
- }));
+ }), null, true);
}
}));
diff --git a/src/main/webapp/js/diagramly/OneDriveClient.js b/src/main/webapp/js/diagramly/OneDriveClient.js
index f5d3b8a6..768f84cc 100644
--- a/src/main/webapp/js/diagramly/OneDriveClient.js
+++ b/src/main/webapp/js/diagramly/OneDriveClient.js
@@ -4,9 +4,19 @@
*/
OneDriveClient = function(editorUi)
{
- DrawioClient.call(this, editorUi, 'odauth');
+ DrawioClient.call(this, editorUi, 'oneDriveAuthInfo');
- this.token = this.token;
+ var authInfo = JSON.parse(this.token);
+
+ if (authInfo != null)
+ {
+ this.token = authInfo.access_token;
+ this.endpointHint = authInfo.endpointHint;
+ this.tokenExpiresOn = authInfo.expiresOn;
+
+ var remainingTime = (this.tokenExpiresOn - Date.now()) / 1000;
+ this.resetTokenRefresh(remainingTime < 600? 1 : remainingTime); //10 min tolerance window in case of any rounding errors
+ }
};
// Extends DrawioClient
@@ -18,17 +28,24 @@ mxUtils.extend(OneDriveClient, DrawioClient);
* existing thumbnail with the placeholder only once.
*/
OneDriveClient.prototype.clientId = (window.location.hostname == 'test.draw.io') ?
- '2e598409-107f-4b59-89ca-d7723c8e00a4' : '45c10911-200f-4e27-a666-9e9fca147395';
+ 'c36dee60-2c6d-4b5f-b552-a7d21798ea52' : '45c10911-200f-4e27-a666-9e9fca147395';
/**
* OAuth 2.0 scopes for installing Drive Apps.
*/
-OneDriveClient.prototype.scopes = 'user.read files.readwrite.all';
+OneDriveClient.prototype.scopes = 'user.read files.readwrite.all offline_access';
/**
* OAuth 2.0 scopes for installing Drive Apps.
*/
-OneDriveClient.prototype.redirectUri = 'https://' + window.location.hostname + '/onedrive3.html';
+OneDriveClient.prototype.redirectUri = 'https://' + window.location.hostname + '/microsoft';
+OneDriveClient.prototype.pickerRedirectUri = 'https://' + window.location.hostname + '/onedrive3.html';
+
+/**
+ * This is the default endpoint for personal accounts
+ */
+OneDriveClient.prototype.defEndpointHint = 'api.onedrive.com';
+OneDriveClient.prototype.endpointHint = OneDriveClient.prototype.defEndpointHint;
/**
* Executes the first step for connecting to Google Drive.
@@ -41,6 +58,11 @@ OneDriveClient.prototype.extension = '.html';
OneDriveClient.prototype.baseUrl = 'https://graph.microsoft.com/v1.0';
/**
+ * Empty function used when no callback is needed
+ */
+OneDriveClient.prototype.emptyFn = function(){};
+
+/**
* Checks if the client is authorized and calls the next step.
*/
OneDriveClient.prototype.get = function(url, onload, onerror)
@@ -102,10 +124,32 @@ OneDriveClient.prototype.updateUser = function(success, error, failOnAuth)
}), error);
};
+OneDriveClient.prototype.resetTokenRefresh = function(expires_in)
+{
+ if (this.tokenRefreshThread != null)
+ {
+ window.clearTimeout(this.tokenRefreshThread);
+ this.tokenRefreshThread = null;
+ }
+
+ // Starts timer to refresh token before it expires
+ if (expires_in > 0)
+ {
+ this.tokenRefreshInterval = expires_in * 1000;
+
+ this.tokenRefreshThread = window.setTimeout(mxUtils.bind(this, function()
+ {
+ //Get a new fresh accessToken
+ this.authenticate(this.emptyFn, this.emptyFn, true);
+ }), expires_in * 900);
+ }
+};
+
+
/**
* Authorizes the client, gets the userId and calls <open>.
*/
-OneDriveClient.prototype.authenticate = function(success, error)
+OneDriveClient.prototype.authenticate = function(success, error, failOnAuth)
{
if (window.onOneDriveCallback == null)
{
@@ -113,93 +157,142 @@ OneDriveClient.prototype.authenticate = function(success, error)
{
var acceptAuthResponse = true;
- this.ui.showAuthDialog(this, true, mxUtils.bind(this, function(remember, authSuccess)
+ //Retry request with refreshed token
+ var authInfo = JSON.parse(this.getPersistentToken(true));
+
+ if (authInfo != null)
{
- var url = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize' +
- '?client_id=' + this.clientId + '&response_type=token' +
- '&redirect_uri=' + encodeURIComponent(this.redirectUri) +
- '&scope=' + encodeURIComponent(this.scopes) +
- '&response_mode=fragment';
-
- var width = 525,
- height = 525,
- screenX = window.screenX,
- screenY = window.screenY,
- outerWidth = window.outerWidth,
- outerHeight = window.outerHeight;
-
- var left = screenX + Math.max(outerWidth - width, 0) / 2;
- var top = screenY + Math.max(outerHeight - height, 0) / 2;
+ var req = new mxXmlRequest(this.redirectUri + '?refresh_token=' + authInfo.refresh_token, null, 'GET');
- var features = ['width=' + width, 'height=' + height,
- 'top=' + top, 'left=' + left,
- 'status=no', 'resizable=yes',
- 'toolbar=no', 'menubar=no',
- 'scrollbars=yes'];
- var popup = window.open(url, 'odauth', features.join(','));
-
- if (popup != null)
+ req.send(mxUtils.bind(this, function(req)
{
- window.onOneDriveCallback = mxUtils.bind(this, function(token, authWindow)
+ if (req.getStatus() >= 200 && req.getStatus() <= 299)
{
- if (acceptAuthResponse)
+ var authInfo = JSON.parse(req.getText());
+ this.token = authInfo.access_token;
+ authInfo.access_token = authInfo.access_token;
+ authInfo.refresh_token = authInfo.refresh_token;
+ authInfo.expiresOn = Date.now() + authInfo.expires_in * 1000;
+ this.tokenExpiresOn = authInfo.expiresOn;
+
+ this.setPersistentToken(JSON.stringify(authInfo), !authInfo.remember);
+ this.resetTokenRefresh(authInfo.expires_in);
+
+ success();
+ }
+ else
+ {
+ this.clearPersistentToken();
+ this.setUser(null);
+ this.token = null;
+
+ if (req.getStatus() == 401 && !failOnAuth) // (Unauthorized) [e.g, invalid refresh token]
{
- window.onOneDriveCallback = null;
- acceptAuthResponse = false;
-
- try
+ auth();
+ }
+ else
+ {
+ error({message: mxResources.get('accessDenied'), retry: auth});
+ }
+ }
+ }), error);
+ }
+ else
+ {
+ this.ui.showAuthDialog(this, true, mxUtils.bind(this, function(remember, authSuccess)
+ {
+ var url = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize' +
+ '?client_id=' + this.clientId + '&response_type=code' +
+ '&redirect_uri=' + encodeURIComponent(this.redirectUri) +
+ '&scope=' + encodeURIComponent(this.scopes);
+
+ var width = 525,
+ height = 525,
+ screenX = window.screenX,
+ screenY = window.screenY,
+ outerWidth = window.outerWidth,
+ outerHeight = window.outerHeight;
+
+ var left = screenX + Math.max(outerWidth - width, 0) / 2;
+ var top = screenY + Math.max(outerHeight - height, 0) / 2;
+
+ var features = ['width=' + width, 'height=' + height,
+ 'top=' + top, 'left=' + left,
+ 'status=no', 'resizable=yes',
+ 'toolbar=no', 'menubar=no',
+ 'scrollbars=yes'];
+ var popup = window.open(url, 'odauth', features.join(','));
+
+ if (popup != null)
+ {
+ window.onOneDriveCallback = mxUtils.bind(this, function(authInfo, authWindow)
+ {
+ if (acceptAuthResponse)
{
- if (token == null)
+ window.onOneDriveCallback = null;
+ acceptAuthResponse = false;
+
+ try
{
- error({message: mxResources.get('accessDenied'), retry: auth});
- }
- else
- {
- if (authSuccess != null)
+ if (authInfo == null)
{
- authSuccess();
+ error({message: mxResources.get('accessDenied'), retry: auth});
}
-
- this.setUser(null);
- this.token = token;
-
- if (remember)
+ else
{
- this.setPersistentToken(token);
+ if (authSuccess != null)
+ {
+ authSuccess();
+ }
+
+ //IE had a security issue on accessing this object outside this callback
+ //this.authInfo = authInfo;
+ this.setUser(null);
+ this.token = authInfo.access_token;
+ authInfo.expiresOn = Date.now() + authInfo.expires_in * 1000;
+ this.tokenExpiresOn = authInfo.expiresOn;
+
+ authInfo.remember = remember;
+ this.setPersistentToken(JSON.stringify(authInfo), !remember);
+ this.resetTokenRefresh(authInfo.expires_in);
+
+ //Find out the type of the account + endpoint
+ this.getAccountTypeAndEndpoint(mxUtils.bind(this, function()
+ {
+ success();
+ }), error);
}
-
- success();
}
- }
- catch (e)
- {
- error(e);
- }
- finally
- {
- if (authWindow != null)
+ catch (e)
{
- authWindow.close();
+ error(e);
+ }
+ finally
+ {
+ if (authWindow != null)
+ {
+ authWindow.close();
+ }
}
}
- }
- else if (authWindow != null)
- {
- authWindow.close();
- }
- });
-
- popup.focus();
- }
- }), mxUtils.bind(this, function()
- {
- if (acceptAuthResponse)
+ else if (authWindow != null)
+ {
+ authWindow.close();
+ }
+ });
+
+ popup.focus();
+ }
+ }), mxUtils.bind(this, function()
{
- window.onOneDriveCallback = null;
- acceptAuthResponse = false;
- error({message: mxResources.get('accessDenied'), retry: auth});
- }
- }));
+ if (acceptAuthResponse)
+ {
+ window.onOneDriveCallback = null;
+ acceptAuthResponse = false;
+ error({message: mxResources.get('accessDenied'), retry: auth});
+ }
+ }));
+ }
});
auth();
@@ -210,6 +303,46 @@ OneDriveClient.prototype.authenticate = function(success, error)
}
};
+
+OneDriveClient.prototype.getAccountTypeAndEndpoint = function(success, error)
+{
+ this.get(this.baseUrl + '/me/drive/root', mxUtils.bind(this, function(req)
+ {
+ try
+ {
+ if (req.getStatus() >= 200 && req.getStatus() <= 299)
+ {
+ var resp = JSON.parse(req.getText());
+
+ if (resp.webUrl.indexOf('.sharepoint.com') > 0)
+ {
+ this.endpointHint = resp.webUrl;
+ }
+ else
+ {
+ this.endpointHint = this.defEndpointHint;
+ }
+
+ //Update authInfo with endpointHint
+ var authInfo = JSON.parse(this.getPersistentToken(true));
+
+ if (authInfo != null)
+ {
+ authInfo.endpointHint = this.endpointHint;
+ this.setPersistentToken(JSON.stringify(authInfo), !authInfo.remember);
+ }
+
+ success();
+ return;
+ }
+ }
+ catch(e) {}
+ //It is expected to work as this call immediately follows getting a fresh access token
+ error({message: mxResources.get('unknownError') + ' (Code: ' + req.getStatus() + ')'});
+
+ }), error);
+};
+
/**
* Checks if the client is authorized and calls the next step.
*/
@@ -234,32 +367,21 @@ OneDriveClient.prototype.executeRequest = function(url, success, error)
// 404 (file not found) is a valid response for checkExists
if ((req.getStatus() >= 200 && req.getStatus() <= 299) || req.getStatus() == 404)
{
+ if (this.user == null)
+ {
+ this.updateUser(this.emptyFn, this.emptyFn, true);
+ }
+
success(req);
}
// 400 is returns if wrong user for this file
else if (req.getStatus() === 401 || req.getStatus() === 400)
{
- this.clearPersistentToken();
- this.setUser(null);
- this.token = null;
-
- if (!failOnAuth)
- {
- this.authenticate(function()
- {
- doExecute(true);
- }, error);
- }
- else
+ //Authorize again using the refresh token
+ this.authenticate(function()
{
- error({message: mxResources.get('accessDenied'), retry: mxUtils.bind(this, function()
- {
- this.authenticate(function()
- {
- fn(true);
- }, error);
- })});
- }
+ doExecute(true);
+ }, error, failOnAuth);
}
else
{
@@ -269,31 +391,31 @@ OneDriveClient.prototype.executeRequest = function(url, success, error)
}), error);
});
- var fn = mxUtils.bind(this, function(failOnAuth)
- {
- if (this.user == null)
- {
- this.updateUser(function()
- {
- fn(true);
- }, error, failOnAuth);
- }
- else
- {
- doExecute(failOnAuth);
- }
- });
-
- if (this.token == null)
+ if (this.token == null || this.tokenExpiresOn - Date.now() < 60000) //60 sec tolerance window
{
this.authenticate(function()
{
- fn(true);
+ doExecute(true);
}, error);
}
else
{
- fn(false);
+ doExecute(false);
+ }
+};
+
+/**
+ * Checks if the client is authorized and calls the next step.
+ */
+OneDriveClient.prototype.checkToken = function(fn)
+{
+ if (this.token == null || this.tokenRefreshThread == null || this.tokenExpiresOn - Date.now() < 60000)
+ {
+ this.authenticate(fn, this.emptyFn);
+ }
+ else
+ {
+ fn();
}
};
@@ -653,31 +775,19 @@ OneDriveClient.prototype.writeFile = function(url, data, method, contentType, su
{
if (req.getStatus() >= 200 && req.getStatus() <= 299)
{
+ if (this.user == null)
+ {
+ this.updateUser(this.emptyFn, this.emptyFn, true);
+ }
+
success(JSON.parse(req.getText()));
}
else if (req.getStatus() === 401)
{
- this.clearPersistentToken();
- this.setUser(null);
- this.token = null;
-
- if (!failOnAuth)
- {
- this.authenticate(function()
- {
- doExecute(true);
- }, error);
- }
- else
+ this.authenticate(function()
{
- error({message: mxResources.get('accessDenied'), retry: mxUtils.bind(this, function()
- {
- this.authenticate(function()
- {
- fn(true);
- }, error);
- })});
- }
+ doExecute(true);
+ }, error, failOnAuth);
}
else
{
@@ -695,31 +805,16 @@ OneDriveClient.prototype.writeFile = function(url, data, method, contentType, su
}));
});
- var fn = mxUtils.bind(this, function(failOnAuth)
- {
- if (this.user == null)
- {
- this.updateUser(function()
- {
- fn(true);
- }, error, failOnAuth);
- }
- else
- {
- doExecute(failOnAuth);
- }
- });
-
- if (this.token == null)
+ if (this.token == null || this.tokenExpiresOn - Date.now() < 60000) //60 sec tolerance window
{
this.authenticate(function()
{
- fn(true);
+ doExecute(true);
}, error);
}
else
{
- fn(false);
+ doExecute(false);
}
}
else
@@ -762,33 +857,76 @@ OneDriveClient.prototype.pickLibrary = function(fn)
/**
* Checks if the client is authorized and calls the next step.
*/
-OneDriveClient.prototype.pickFolder = function(fn)
+OneDriveClient.prototype.pickFolder = function(fn, direct)
{
- OneDrive.save(
+ var odSaveDlg = mxUtils.bind(this, function(direct)
{
- clientId: this.clientId,
- action: 'query',
- openInNewWindow: true,
- advanced:
+ var openSaveDlg = mxUtils.bind(this, function()
{
- 'redirectUri': this.redirectUri,
- 'queryParameters': 'select=id,name,parentReference'
- },
- success: mxUtils.bind(this, function(files)
+ OneDrive.save(
+ {
+ clientId: this.clientId,
+ action: 'query',
+ openInNewWindow: true,
+ advanced:
+ {
+ 'endpointHint': mxClient.IS_IE11? null : this.endpointHint, //IE11 doen't work with our modified version, so, setting endpointHint disable using our token BUT will force relogin!
+ 'redirectUri': this.pickerRedirectUri,
+ 'queryParameters': 'select=id,name,parentReference',
+ 'accessToken': this.token,
+ isConsumerAccount: false
+ },
+ success: mxUtils.bind(this, function(files)
+ {
+ fn(files);
+
+ //Update the token in case a login with a different user
+ if (mxClient.IS_IE11)
+ {
+ this.token = files.accessToken;
+ }
+ }),
+ cancel: mxUtils.bind(this, function()
+ {
+ // do nothing
+ }),
+ error: mxUtils.bind(this, function(e)
+ {
+ this.ui.showError(mxResources.get('error'), e);
+ })
+ });
+ });
+
+ if (direct)
{
- // KNOWN: Token should be per I/O operation
- this.token = files.accessToken;
- fn(files);
- }),
- cancel: function()
+ openSaveDlg();
+ }
+ else
{
- // do nothing
- },
- error: mxUtils.bind(this, function(e)
+ this.ui.confirm(mxResources.get('useRootFolder'), mxUtils.bind(this, function()
+ {
+ fn({value: [{id: 'root', name: 'root', parentReference: {driveId: 'me'}}]});
+
+ }), openSaveDlg, mxResources.get('yes'), mxResources.get('no'));
+ }
+
+ if (this.user == null)
{
- this.ui.showError(mxResources.get('error'), e);
- })
+ this.updateUser(this.emptyFn, this.emptyFn, true);
+ }
});
+
+ if (this.token == null || this.tokenExpiresOn - Date.now() < 60000) //60 sec tolerance window
+ {
+ this.authenticate(mxUtils.bind(this, function()
+ {
+ odSaveDlg(false);
+ }), this.emptyFn);
+ }
+ else
+ {
+ odSaveDlg(direct);
+ }
};
/**
@@ -801,34 +939,66 @@ OneDriveClient.prototype.pickFile = function(fn)
this.ui.loadFile('W' + encodeURIComponent(id));
});
- OneDrive.open(
+ var odOpenDlg = mxUtils.bind(this, function()
{
- clientId: this.clientId,
- action: 'query',
- multiSelect: false,
- advanced:
- {
- 'redirectUri': this.redirectUri,
- 'queryParameters': 'select=id,name,parentReference' //We can also get @microsoft.graph.downloadUrl within this request but it will break the normal process
- },
- success: mxUtils.bind(this, function(files)
+ OneDrive.open(
{
- if (files != null && files.value != null && files.value.length > 0)
+ clientId: this.clientId,
+ action: 'query',
+ multiSelect: false,
+ advanced:
{
- // KNOWN: Token should be per I/O operation
- this.token = files.accessToken;
- fn(OneDriveFile.prototype.getIdOf(files.value[0]), files);
- }
- }),
- cancel: function()
- {
- // do nothing
- },
- error: mxUtils.bind(this, function(e)
+ 'endpointHint': mxClient.IS_IE11? null : this.endpointHint, //IE11 doen't work with our modified version, so, setting endpointHint disable using our token BUT will force relogin!
+ 'redirectUri': this.pickerRedirectUri,
+ 'queryParameters': 'select=id,name,parentReference', //We can also get @microsoft.graph.downloadUrl within this request but it will break the normal process
+ 'accessToken': this.token,
+ isConsumerAccount: false
+ },
+ success: mxUtils.bind(this, function(files)
+ {
+ if (files != null && files.value != null && files.value.length > 0)
+ {
+ //Update the token in case a login with a different user
+ if (mxClient.IS_IE11)
+ {
+ this.token = files.accessToken;
+ }
+
+ fn(OneDriveFile.prototype.getIdOf(files.value[0]), files);
+ }
+ }),
+ cancel: mxUtils.bind(this, function()
+ {
+ // do nothing
+ }),
+ error: mxUtils.bind(this, function(e)
+ {
+ this.ui.showError(mxResources.get('error'), e);
+ })
+ });
+
+ if (this.user == null)
{
- this.ui.showError(mxResources.get('error'), e);
- })
+ this.updateUser(this.emptyFn, this.emptyFn, true);
+ }
});
+
+ if (this.token == null || this.tokenExpiresOn - Date.now() < 60000) //60 sec tolerance window
+ {
+ this.authenticate(mxUtils.bind(this, function()
+ {
+ this.ui.showDialog(new BtnDialog(this.ui, this, mxResources.get('open'), mxUtils.bind(this, function()
+ {
+ odOpenDlg();
+ this.ui.hideDialog();
+
+ })).container, 300, 140, true, true);
+ }), this.emptyFn);
+ }
+ else
+ {
+ odOpenDlg();
+ }
};
/**
diff --git a/src/main/webapp/js/diagramly/vsdx/VsdxExport.js b/src/main/webapp/js/diagramly/vsdx/VsdxExport.js
index 96e376cf..6d7b2d5a 100644
--- a/src/main/webapp/js/diagramly/vsdx/VsdxExport.js
+++ b/src/main/webapp/js/diagramly/vsdx/VsdxExport.js
@@ -392,7 +392,7 @@ function VsdxExport(editorUi)
{
var state = graph.view.getState(cell, true);
- if (state == null)
+ if (state == null || state.absolutePoints == null || state.cellBounds == null)
{
return null;
}
@@ -531,16 +531,23 @@ function VsdxExport(editorUi)
var subShape = convertMxCell2Shape(cell, graph, xmlDoc, geo.height, geo, true);
cell.treatAsSingle = false;
cell.setGeometry(geo);
- gShapes.appendChild(subShape);
+
+ if (subShape != null)
+ {
+ gShapes.appendChild(subShape);
+ }
//add group children
- for (var i = 0; i < cell.children.length; i++)
+ for (var i = 0; i < cell.getChildCount(); i++)
{
var child = cell.children[i];
var subShape = convertMxCell2Shape(child, graph, xmlDoc, geo.height, geo, true);
- gShapes.appendChild(subShape);
+ if (subShape != null)
+ {
+ gShapes.appendChild(subShape);
+ }
}
shape.appendChild(gShapes);
@@ -889,6 +896,7 @@ function VsdxExport(editorUi)
catch(e)
{
console.log(e);
+ editorUi.spinner.stop();
return false;
}
};
diff --git a/src/main/webapp/js/embed-static.min.js b/src/main/webapp/js/embed-static.min.js
index d20f36d2..41127929 100644
--- a/src/main/webapp/js/embed-static.min.js
+++ b/src/main/webapp/js/embed-static.min.js
@@ -72,20 +72,20 @@ li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement
s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};p.ELEMENT_DOM_INTERFACES=p.Q;p.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};p.ueffects=p.P;p.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
p.URIEFFECTS=p.J;p.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};p.ltypes=p.M;p.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};p.LOADERTYPES=p.I;"undefined"!==typeof window&&(window.html4=p);a=function(a){function b(a,b){var c;if(ca.hasOwnProperty(b))c=ca[b];else{var d=b.match(W);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(v))?String.fromCharCode(parseInt(d[1],
-16)):J&&P.test(b)?(J.innerHTML="&"+b+";",d=J.textContent,ca[b]=d):"&"+b+";"}return c}function c(a){return a.replace(da,b)}function d(a){return(""+a).replace(I,"&amp;").replace(aa,"&lt;").replace(ea,"&gt;").replace(U,"&#34;")}function e(a){return a.replace(M,"&amp;$1").replace(aa,"&lt;").replace(ea,"&gt;")}function g(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
-d=a+"";if(S)d=d.split(e);else{for(var f=[],g=0,h;null!==(h=e.exec(d));)f.push(d.substring(g,h.index)),f.push(h[0]),g=h.index+h[0].length;f.push(d.substring(g));d=f}k(b,d,0,{r:!1,C:!1},c)}}function h(a,b,c,d,e){return function(){k(a,b,c,d,e)}}function k(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var g,k,n,v=c.length;d<v;){var p=c[d++],C=c[d];switch(p){case "&":N.test(C)?(b.e&&b.e("&"+C,f,O,h(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,O,h(b,c,d,e,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(C))if(g[0].length===
+16)):J&&P.test(b)?(J.innerHTML="&"+b+";",d=J.textContent,ca[b]=d):"&"+b+";"}return c}function c(a){return a.replace(da,b)}function d(a){return(""+a).replace(I,"&amp;").replace(aa,"&lt;").replace(ea,"&gt;").replace(S,"&#34;")}function e(a){return a.replace(M,"&amp;$1").replace(aa,"&lt;").replace(ea,"&gt;")}function g(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
+d=a+"";if(T)d=d.split(e);else{for(var f=[],g=0,h;null!==(h=e.exec(d));)f.push(d.substring(g,h.index)),f.push(h[0]),g=h.index+h[0].length;f.push(d.substring(g));d=f}k(b,d,0,{r:!1,C:!1},c)}}function h(a,b,c,d,e){return function(){k(a,b,c,d,e)}}function k(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var g,k,n,v=c.length;d<v;){var p=c[d++],C=c[d];switch(p){case "&":N.test(C)?(b.e&&b.e("&"+C,f,O,h(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,O,h(b,c,d,e,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(C))if(g[0].length===
C.length&&">"===c[d+1])d+=2,n=g[1].toLowerCase(),b.t&&b.t(n,f,O,h(b,c,d,e,f));else{var R=c,Z=d,q=b,r=f,X=O,J=e,P=m(R,Z);P?(q.t&&q.t(P.name,r,X,h(q,R,Z,J,r)),d=P.next):d=R.length}else b.e&&b.e("&lt;/",f,O,h(b,c,d,e,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(C))if(g[0].length===C.length&&">"===c[d+1]){d+=2;n=g[1].toLowerCase();b.w&&b.w(n,[],f,O,h(b,c,d,e,f));var t=a.f[n];t&Y&&(d=l(c,{name:n,next:d,c:t},b,f,O,e))}else{var R=c,Z=b,q=f,r=O,X=e,B=m(R,d);B?(Z.w&&Z.w(B.name,B.R,q,r,h(Z,R,B.next,X,q)),
d=B.c&Y?l(R,B,Z,q,r,X):B.next):d=R.length}else b.e&&b.e("&lt;",f,O,h(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(k=d+1;k<v&&(">"!==c[k]||!/--$/.test(c[k-1]));k++);if(k<v){if(b.A){var G=c.slice(d,k).join("");b.A(G.substr(0,G.length-2),f,O,h(b,c,k+1,e,f))}d=k+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,O,h(b,c,d,e,f));break;case "<!":if(/^\w/.test(C)){if(!e.r){for(k=d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f));break;case "<?":if(!e.r){for(k=
-d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,O,h(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,O,h(b,c,d,e,f));break;case "":break;default:b.e&&b.e(p,f,O,h(b,c,d,e,f))}}b.B&&b.B(f)}catch(ga){if(ga!==O)throw ga;}}function l(b,c,d,f,g,k){var l=b.length;R.hasOwnProperty(c.name)||(R[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var m=R[c.name],n=c.next,v=c.next+1;v<l&&("</"!==b[v-1]||!m.test(b[v]));v++);v<l&&--v;l=b.slice(n,v).join("");if(c.c&a.c.CDATA)d.z&&d.z(l,f,g,h(d,b,
+d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,O,h(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,O,h(b,c,d,e,f));break;case "":break;default:b.e&&b.e(p,f,O,h(b,c,d,e,f))}}b.B&&b.B(f)}catch(ha){if(ha!==O)throw ha;}}function l(b,c,d,f,g,k){var l=b.length;R.hasOwnProperty(c.name)||(R[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var m=R[c.name],n=c.next,v=c.next+1;v<l&&("</"!==b[v-1]||!m.test(b[v]));v++);v<l&&--v;l=b.slice(n,v).join("");if(c.c&a.c.CDATA)d.z&&d.z(l,f,g,h(d,b,
v,k,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(l),f,g,h(d,b,v,k,f));else throw Error("bug");return v}function m(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var g=b[d].substr(e[0].length),h=d+1,k=b.length;h<k&&">"!==b[h];h++)g+=b[h];if(!(k<=h)){for(var l=[];""!==g;)if(e=Q.exec(g))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],m=!1,g=[g,b[h++]];h<k;h++){if(m){if(">"===b[h])break}else 0<=b[h].indexOf(e)&&(m=!0);g.push(b[h])}if(k<=h)break;g=g.join("")}else{var m=
e[1].toLowerCase(),n;if(e[2]){n=e[3];var v=n.charCodeAt(0);if(34===v||39===v)n=n.substr(1,n.length-2);n=c(n.replace(G,""))}else n="";l.push(m,n);g=g.substr(e[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=l;f.next=h+1;return f}}function n(b){function c(a,b){f||b.push(a)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(c,g,h){if(!f&&a.f.hasOwnProperty(c)){var k=a.f[c];if(!(k&a.c.FOLDABLE)){var l=b(c,g);if(l){if("object"!==typeof l)throw Error("tagPolicy did not return object (old API?)");
if("attribs"in l)g=l.attribs;else throw Error("tagPolicy gave no attribs");var m;"tagName"in l?(m=l.tagName,l=a.f[m]):(m=c,l=k);if(k&a.c.OPTIONAL_ENDTAG){var n=e[e.length-1];n&&n.D===c&&(n.v!==m||c!==m)&&h.push("</",n.v,">")}k&a.c.EMPTY||e.push({D:c,v:m});h.push("<",m);c=0;for(n=g.length;c<n;c+=2){var v=g[c],p=g[c+1];null!==p&&void 0!==p&&h.push(" ",v,'="',d(p),'"')}h.push(">");k&a.c.EMPTY&&!(l&a.c.EMPTY)&&h.push("</",m,">")}else f=!(k&a.c.EMPTY)}}},endTag:function(b,c){if(f)f=!1;else if(a.f.hasOwnProperty(b)){var d=
a.f[b];if(!(d&(a.c.EMPTY|a.c.FOLDABLE))){if(d&a.c.OPTIONAL_ENDTAG)for(d=e.length;0<=--d;){var g=e[d].D;if(g===b)break;if(!(a.f[g]&a.c.OPTIONAL_ENDTAG))return}else for(d=e.length;0<=--d&&e[d].D!==b;);if(!(0>d)){for(g=e.length;--g>d;){var h=e[g].v;a.f[h]&a.c.OPTIONAL_ENDTAG||c.push("</",h,">")}d<e.length&&(b=e[d].v);e.length=d;c.push("</",b,">")}}}},pcdata:c,rcdata:c,cdata:c,endDoc:function(a){for(;e.length;e.length--)a.push("</",e[e.length-1].v,">")}})}function p(a,b,c,d,e){if(!e)return null;try{var g=
-f.parse(""+a);if(g&&(!g.K()||fa.test(g.W()))){var h=e(g,b,c,d);return h?h.toString():null}}catch(na){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function C(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function L(b,c,d,e,f){for(var g=0;g<c.length;g+=2){var h=c[g],k=c[g+1],l=k,m=null,n;if((n=
-b+"::"+h,a.m.hasOwnProperty(n))||(n="*::"+h,a.m.hasOwnProperty(n)))m=a.m[n];if(null!==m)switch(m){case a.d.NONE:break;case a.d.SCRIPT:k=null;f&&r(f,b,h,l,k);break;case a.d.STYLE:if("undefined"===typeof V){k=null;f&&r(f,b,h,l,k);break}var v=[];V(k,{declaration:function(b,c){var e=b.toLowerCase();T(e,c,d?function(b){return p(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&v.push(e+": "+c.join(" "))}});k=0<v.length?v.join(" ; "):null;f&&r(f,b,h,l,k);break;case a.d.ID:case a.d.IDREF:case a.d.IDREFS:case a.d.GLOBAL_NAME:case a.d.LOCAL_NAME:case a.d.CLASSES:k=
+f.parse(""+a);if(g&&(!g.K()||fa.test(g.W()))){var h=e(g,b,c,d);return h?h.toString():null}}catch(pa){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function C(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function L(b,c,d,e,f){for(var g=0;g<c.length;g+=2){var h=c[g],k=c[g+1],l=k,m=null,n;if((n=
+b+"::"+h,a.m.hasOwnProperty(n))||(n="*::"+h,a.m.hasOwnProperty(n)))m=a.m[n];if(null!==m)switch(m){case a.d.NONE:break;case a.d.SCRIPT:k=null;f&&r(f,b,h,l,k);break;case a.d.STYLE:if("undefined"===typeof V){k=null;f&&r(f,b,h,l,k);break}var v=[];V(k,{declaration:function(b,c){var e=b.toLowerCase();U(e,c,d?function(b){return p(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&v.push(e+": "+c.join(" "))}});k=0<v.length?v.join(" ; "):null;f&&r(f,b,h,l,k);break;case a.d.ID:case a.d.IDREF:case a.d.IDREFS:case a.d.GLOBAL_NAME:case a.d.LOCAL_NAME:case a.d.CLASSES:k=
e?e(k):k;f&&r(f,b,h,l,k);break;case a.d.URI:k=p(k,C(a.J,b,h),C(a.I,b,h),{TYPE:"MARKUP",XML_ATTR:h,XML_TAG:b},d);f&&r(f,b,h,l,k);break;case a.d.URI_FRAGMENT:k&&"#"===k.charAt(0)?(k=k.substring(1),k=e?e(k):k,null!==k&&void 0!==k&&(k="#"+k)):k=null;f&&r(f,b,h,l,k);break;default:k=null,f&&r(f,b,h,l,k)}else k=null,f&&r(f,b,h,l,k);c[g+1]=k}return c}function K(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:L(e,f,b,c,d)}}}function H(a,b){var c=[];n(b)(a,
-c);return c.join("")}var V,T;"undefined"!==typeof window&&(V=window.parseCssDeclarations,T=window.sanitizeCssProperty);var ca={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},W=/^#(\d+)$/,v=/^#x([0-9A-Fa-f]+)$/,P=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,G=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,N=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,I=/&/g,M=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,aa=
-/[<]/g,ea=/>/g,U=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,S=3==="a,b".split(/(,)/).length,Y=a.c.CDATA|a.c.RCDATA,O={},R={},fa=/^(?:https?|mailto|data)$/i,X={};X.pa=X.escapeAttrib=d;X.ra=X.makeHtmlSanitizer=n;X.sa=X.makeSaxParser=g;X.ta=X.makeTagPolicy=K;X.wa=X.normalizeRCData=e;X.xa=X.sanitize=function(a,b,c,d){return H(a,K(b,c,d))};X.ya=X.sanitizeAttribs=L;X.za=X.sanitizeWithPolicy=H;X.Ba=X.unescapeEntities=c;return X}(p);c=a.sanitize;"undefined"!==
+c);return c.join("")}var V,U;"undefined"!==typeof window&&(V=window.parseCssDeclarations,U=window.sanitizeCssProperty);var ca={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},W=/^#(\d+)$/,v=/^#x([0-9A-Fa-f]+)$/,P=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,G=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,N=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,I=/&/g,M=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,aa=
+/[<]/g,ea=/>/g,S=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,T=3==="a,b".split(/(,)/).length,Y=a.c.CDATA|a.c.RCDATA,O={},R={},fa=/^(?:https?|mailto|data)$/i,X={};X.pa=X.escapeAttrib=d;X.ra=X.makeHtmlSanitizer=n;X.sa=X.makeSaxParser=g;X.ta=X.makeTagPolicy=K;X.wa=X.normalizeRCData=e;X.xa=X.sanitize=function(a,b,c,d){return H(a,K(b,c,d))};X.ya=X.sanitizeAttribs=L;X.za=X.sanitizeWithPolicy=H;X.Ba=X.unescapeEntities=c;return X}(p);c=a.sanitize;"undefined"!==
typeof window&&(window.html=a,window.html_sanitize=c)})();var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,h,k,l=0;for(null!=b&&b||(a=Base64._utf8_encode(a));l<a.length;)d=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=d>>2,d=(d&3)<<4|e>>4,h=(e&15)<<2|f>>6,k=f&63,isNaN(e)?h=k=64:isNaN(f)&&(k=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(h)+this._keyStr.charAt(k);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,h,k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");k<a.length;)d=this._keyStr.indexOf(a.charAt(k++)),e=this._keyStr.indexOf(a.charAt(k++)),g=this._keyStr.indexOf(a.charAt(k++)),h=this._keyStr.indexOf(a.charAt(k++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|h,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=h&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function b(c,d,e){function f(h,l){if(!d[h]){if(!c[h]){var k="function"==typeof require&&require;if(!l&&k)return k(h,!0);if(g)return g(h,!0);k=Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k;}k=d[h]={exports:{}};
@@ -112,27 +112,27 @@ function h(b,c){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart
b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=g?e-g:0;while(--d);c=d=g;do e=b.prev[--c],b.prev[c]=e>=g?e-g:0;while(--d);f+=g}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var h=b.strstart+b.lookahead,k=c.avail_in;if(d=(k>f&&(k=f),0===k?0:(c.avail_in-=k,u.arraySet(e,c.input,c.next_in,k,h),1===c.state.wrap?c.adler=F(c.adler,e,k,h):2===c.state.wrap&&(c.adler=E(c.adler,e,k,h)),c.next_in+=k,c.total_in+=k,k)),b.lookahead+=d,b.lookahead+
b.insert>=I)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+I-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<I)););}while(b.lookahead<aa&&0!==b.strm.avail_in)}function p(b,c){for(var d,e;;){if(b.lookahead<aa){if(n(b),b.lookahead<aa&&c===A)return Q;if(0===b.lookahead)break}if(d=0,b.lookahead>=I&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-aa&&(b.match_length=m(b,d)),b.match_length>=I)if(e=D._tr_tally(b,b.strstart-b.match_start,b.match_length-I),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=I){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);
-b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(h(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<I-1?b.strstart:I-1,c===C?(h(b,!0),0===b.strm.avail_out?Y:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?Q:S}function r(b,c){for(var d,e,f;;){if(b.lookahead<aa){if(n(b),b.lookahead<aa&&c===A)return Q;
+b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(h(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<I-1?b.strstart:I-1,c===C?(h(b,!0),0===b.strm.avail_out?Y:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?Q:T}function r(b,c){for(var d,e,f;;){if(b.lookahead<aa){if(n(b),b.lookahead<aa&&c===A)return Q;
if(0===b.lookahead)break}if(d=0,b.lookahead>=I&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=I-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-aa&&(b.match_length=m(b,d),5>=b.match_length&&(b.strategy===V||b.match_length===I&&4096<b.strstart-b.match_start)&&(b.match_length=I-1)),b.prev_length>=I&&b.match_length<=b.prev_length){f=
b.strstart+b.lookahead-I;e=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-I);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=I-1,b.strstart++,e&&(h(b,!1),0===b.strm.avail_out))return Q}else if(b.match_available){if(e=D._tr_tally(b,0,b.window[b.strstart-1]),e&&h(b,!1),
-b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<I-1?b.strstart:I-1,c===C?(h(b,!0),0===b.strm.avail_out?Y:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?Q:S}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
+b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<I-1?b.strstart:I-1,c===C?(h(b,!0),0===b.strm.avail_out?Y:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?Q:T}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=W;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=
this.ins_h=0;this.dyn_ltree=new u.Buf16(2*da);this.dyn_dtree=new u.Buf16(2*(2*J+1));this.bl_tree=new u.Buf16(2*(2*G+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new u.Buf16(N+1);this.heap=new u.Buf16(2*P+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new u.Buf16(2*P+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function z(b){var c;
-return b&&b.state?(b.total_in=b.total_out=0,b.data_type=ca,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ea:U,b.adler=2===c.wrap?0:1,c.last_flush=A,D._tr_init(c),L):e(b,K)}function w(b){var c=z(b);c===L&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
-b.prev_length=I-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,g,h){if(!b)return K;var k=1;if(c===H&&(c=6),0>f?(k=0,f=-f):15<f&&(k=2,f-=16),1>g||g>v||d!==W||8>f||15<f||0>c||9<c||0>h||h>T)return e(b,K);8===f&&(f=9);var l=new t;return b.state=l,l.strm=b,l.wrap=k,l.gzhead=null,l.w_bits=f,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=g+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+I-1)/I),l.window=new u.Buf8(2*l.w_size),l.head=new u.Buf16(l.hash_size),
-l.prev=new u.Buf16(l.w_size),l.lit_bufsize=1<<g+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new u.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=c,l.strategy=h,l.method=d,w(b)}var y,u=b("../utils/common"),D=b("./trees"),F=b("./adler32"),E=b("./crc32"),B=b("./messages"),A=0,C=4,L=0,K=-2,H=-1,V=1,T=4,ca=2,W=8,v=9,P=286,J=30,G=19,da=2*P+1,N=15,I=3,M=258,aa=M+I+1,ea=42,U=113,Q=1,S=2,Y=3,O=4;y=[new q(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
+return b&&b.state?(b.total_in=b.total_out=0,b.data_type=ca,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ea:S,b.adler=2===c.wrap?0:1,c.last_flush=A,D._tr_init(c),L):e(b,K)}function w(b){var c=z(b);c===L&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
+b.prev_length=I-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,g,h){if(!b)return K;var k=1;if(c===H&&(c=6),0>f?(k=0,f=-f):15<f&&(k=2,f-=16),1>g||g>v||d!==W||8>f||15<f||0>c||9<c||0>h||h>U)return e(b,K);8===f&&(f=9);var l=new t;return b.state=l,l.strm=b,l.wrap=k,l.gzhead=null,l.w_bits=f,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=g+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+I-1)/I),l.window=new u.Buf8(2*l.w_size),l.head=new u.Buf16(l.hash_size),
+l.prev=new u.Buf16(l.w_size),l.lit_bufsize=1<<g+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new u.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=c,l.strategy=h,l.method=d,w(b)}var y,u=b("../utils/common"),D=b("./trees"),F=b("./adler32"),E=b("./crc32"),B=b("./messages"),A=0,C=4,L=0,K=-2,H=-1,V=1,U=4,ca=2,W=8,v=9,P=286,J=30,G=19,da=2*P+1,N=15,I=3,M=258,aa=M+I+1,ea=42,S=113,Q=1,T=2,Y=3,O=4;y=[new q(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(n(b),0===b.lookahead&&c===A)return Q;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,h(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-aa&&(h(b,!1),0===b.strm.avail_out))return Q}return b.insert=0,c===C?(h(b,!0),0===b.strm.avail_out?Y:O):(b.strstart>b.block_start&&h(b,!1),Q)}),new q(4,4,8,4,p),new q(4,5,16,8,p),new q(4,6,
32,32,p),new q(4,4,16,16,r),new q(8,16,32,32,r),new q(8,16,128,128,r),new q(8,32,128,256,r),new q(32,128,258,1024,r),new q(32,258,258,4096,r)];d.deflateInit=function(b,c){return x(b,c,W,15,8,0)};d.deflateInit2=x;d.deflateReset=w;d.deflateResetKeep=z;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?K:(b.state.gzhead=c,L):K};d.deflate=function(b,c){var d,m,v,p;if(!b||!b.state||5<c||0>c)return b?e(b,K):K;if(m=b.state,!b.output||!b.input&&0!==b.avail_in||666===m.status&&c!==C)return e(b,
0===b.avail_out?-5:K);if(m.strm=b,d=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(b.adler=0,k(m,31),k(m,139),k(m,8),m.gzhead?(k(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),k(m,255&m.gzhead.time),k(m,m.gzhead.time>>8&255),k(m,m.gzhead.time>>16&255),k(m,m.gzhead.time>>24&255),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(k(m,255&m.gzhead.extra.length),k(m,m.gzhead.extra.length>>
-8&255)),m.gzhead.hcrc&&(b.adler=E(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(k(m,0),k(m,0),k(m,0),k(m,0),k(m,0),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,3),m.status=U)):(v=W+(m.w_bits-8<<4)<<8,v|=(2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3)<<6,0!==m.strstart&&(v|=32),m.status=U,l(m,v+(31-v%31)),0!==m.strstart&&(l(m,b.adler>>>16),l(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(v=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==
+8&255)),m.gzhead.hcrc&&(b.adler=E(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(k(m,0),k(m,0),k(m,0),k(m,0),k(m,0),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,3),m.status=S)):(v=W+(m.w_bits-8<<4)<<8,v|=(2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3)<<6,0!==m.strstart&&(v|=32),m.status=S,l(m,v+(31-v%31)),0!==m.strstart&&(l(m,b.adler>>>16),l(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(v=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==
m.pending_buf_size||(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending!==m.pending_buf_size));)k(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-
v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=1;break}p=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=
-1;break}p=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(k(m,255&b.adler),k(m,b.adler>>8&255),b.adler=0,m.status=U)):m.status=U),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush=-1,L}else if(0===b.avail_in&&(c<<1)-
+1;break}p=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(k(m,255&b.adler),k(m,b.adler>>8&255),b.adler=0,m.status=S)):m.status=S),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush=-1,L}else if(0===b.avail_in&&(c<<1)-
(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==C)return e(b,-5);if(666===m.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==m.lookahead||c!==A&&666!==m.status){var q;if(2===m.strategy)a:{for(var r;;){if(0===m.lookahead&&(n(m),0===m.lookahead)){if(c===A){q=Q;break a}break}if(m.match_length=0,r=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,r&&(h(m,!1),0===m.strm.avail_out)){q=Q;break a}}q=(m.insert=0,c===C?(h(m,!0),0===m.strm.avail_out?Y:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?
-Q:S)}else if(3===m.strategy)a:{var J,P;for(r=m.window;;){if(m.lookahead<=M){if(n(m),m.lookahead<=M&&c===A){q=Q;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=I&&0<m.strstart&&(P=m.strstart-1,J=r[P],J===r[++P]&&J===r[++P]&&J===r[++P])){for(d=m.strstart+M;J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&P<d;);m.match_length=M-(d-P);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=I?(q=D._tr_tally(m,1,m.match_length-
-I),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(h(m,!1),0===m.strm.avail_out)){q=Q;break a}}q=(m.insert=0,c===C?(h(m,!0),0===m.strm.avail_out?Y:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?Q:S)}else q=y[m.level].func(m,c);if(q!==Y&&q!==O||(m.status=666),q===Q||q===Y)return 0===b.avail_out&&(m.last_flush=-1),L;if(q===S&&(1===c?D._tr_align(m):5!==c&&(D._tr_stored_block(m,0,0,!1),3===c&&(f(m.head),0===
+Q:T)}else if(3===m.strategy)a:{var J,P;for(r=m.window;;){if(m.lookahead<=M){if(n(m),m.lookahead<=M&&c===A){q=Q;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=I&&0<m.strstart&&(P=m.strstart-1,J=r[P],J===r[++P]&&J===r[++P]&&J===r[++P])){for(d=m.strstart+M;J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&P<d;);m.match_length=M-(d-P);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=I?(q=D._tr_tally(m,1,m.match_length-
+I),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(h(m,!1),0===m.strm.avail_out)){q=Q;break a}}q=(m.insert=0,c===C?(h(m,!0),0===m.strm.avail_out?Y:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?Q:T)}else q=y[m.level].func(m,c);if(q!==Y&&q!==O||(m.status=666),q===Q||q===Y)return 0===b.avail_out&&(m.last_flush=-1),L;if(q===T&&(1===c?D._tr_align(m):5!==c&&(D._tr_stored_block(m,0,0,!1),3===c&&(f(m.head),0===
m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(b),0===b.avail_out))return m.last_flush=-1,L}return c!==C?L:0>=m.wrap?1:(2===m.wrap?(k(m,255&b.adler),k(m,b.adler>>8&255),k(m,b.adler>>16&255),k(m,b.adler>>24&255),k(m,255&b.total_in),k(m,b.total_in>>8&255),k(m,b.total_in>>16&255),k(m,b.total_in>>24&255)):(l(m,b.adler>>>16),l(m,65535&b.adler)),g(b),0<m.wrap&&(m.wrap=-m.wrap),0!==m.pending?L:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==ea&&69!==c&&73!==c&&91!==
-c&&103!==c&&c!==U&&666!==c?e(b,K):(b.state=null,c===U?e(b,-3):L)):K};d.deflateSetDictionary=function(b,c){var d,e,g,h,k,m,l;e=c.length;if(!b||!b.state||(d=b.state,h=d.wrap,2===h||1===h&&d.status!==ea||d.lookahead))return K;1===h&&(b.adler=F(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===h&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),k=new u.Buf8(d.w_size),u.arraySet(k,c,e-d.w_size,d.w_size,0),c=k,e=d.w_size);k=b.avail_in;m=b.next_in;l=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(n(d);d.lookahead>=
+c&&103!==c&&c!==S&&666!==c?e(b,K):(b.state=null,c===S?e(b,-3):L)):K};d.deflateSetDictionary=function(b,c){var d,e,g,h,k,m,l;e=c.length;if(!b||!b.state||(d=b.state,h=d.wrap,2===h||1===h&&d.status!==ea||d.lookahead))return K;1===h&&(b.adler=F(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===h&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),k=new u.Buf8(d.w_size),u.arraySet(k,c,e-d.w_size,d.w_size,0),c=k,e=d.w_size);k=b.avail_in;m=b.next_in;l=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(n(d);d.lookahead>=
I;){e=d.strstart;g=d.lookahead-(I-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+I-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--g);d.strstart=e;d.lookahead=I-1;n(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=I-1,d.match_available=0,b.next_in=m,b.input=l,b.avail_in=k,d.wrap=h,L};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,e,f,l,m,n,p,r,q,t,z,w,x,y,u,D,F,E,B,A,C,L,K,H;d=b.state;e=b.next_in;K=b.input;f=e+(b.avail_in-5);l=b.next_out;H=b.output;m=l-(c-b.avail_out);n=l+(b.avail_out-257);p=d.dmax;r=d.wsize;q=d.whave;t=d.wnext;z=d.window;w=d.hold;x=d.bits;y=d.lencode;u=d.distcode;D=(1<<d.lenbits)-
1;F=(1<<d.distbits)-1;a:do b:for(15>x&&(w+=K[e++]<<x,x+=8,w+=K[e++]<<x,x+=8),E=y[w&D];;){if(B=E>>>24,w>>>=B,x-=B,B=E>>>16&255,0===B)H[l++]=65535&E;else{if(!(16&B)){if(0===(64&B)){E=y[(65535&E)+(w&(1<<B)-1)];continue b}if(32&B){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}A=65535&E;(B&=15)&&(x<B&&(w+=K[e++]<<x,x+=8),A+=w&(1<<B)-1,w>>>=B,x-=B);15>x&&(w+=K[e++]<<x,x+=8,w+=K[e++]<<x,x+=8);E=u[w&F];c:for(;;){if(B=E>>>24,w>>>=B,x-=B,B=E>>>16&255,!(16&B)){if(0===(64&B)){E=u[(65535&
@@ -141,8 +141,8 @@ while(--B);E=l-C;L=H}}}else if(E+=t-B,B<A){A-=B;do H[l++]=z[E++];while(--B);E=l-
24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new r.Buf16(320);this.work=new r.Buf16(288);this.distdyn=this.lendyn=null;this.was=
this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=u,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(D),c.distcode=c.distdyn=new r.Buf32(F),c.sane=1,c.back=-1,x):y}function h(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):y}function k(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<
c)?y:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,h(b))):y}function l(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=k(b,c),d!==x&&(b.state=null),d):y}function m(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new r.Buf8(b.wsize)),e>=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d-e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext=
-e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var n,p,r=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),z=b("./inffast"),w=b("./inftrees"),x=0,y=-2,u=1,D=852,F=592,E=!0;d.inflateReset=h;d.inflateReset2=k;d.inflateResetKeep=g;d.inflateInit=function(b){return l(b,15)};d.inflateInit2=l;d.inflate=function(b,c){var d,f,g,h,k,l,B,A,v,P,J,G,da,N,I,M,D,F,U,Q,S,Y,O=0,R=new r.Buf8(4),fa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
-!b.output||!b.input&&0!==b.avail_in)return y;d=b.state;12===d.mode&&(d.mode=13);k=b.next_out;g=b.output;B=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;P=l;J=B;S=x;a:for(;;)switch(d.mode){case u:if(0===d.wrap){d.mode=13;break}for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(2&d.wrap&&35615===A){d.check=0;R[0]=255&A;R[1]=A>>>8&255;d.check=t(d.check,R,2,0);v=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";
+e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var n,p,r=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),z=b("./inffast"),w=b("./inftrees"),x=0,y=-2,u=1,D=852,F=592,E=!0;d.inflateReset=h;d.inflateReset2=k;d.inflateResetKeep=g;d.inflateInit=function(b){return l(b,15)};d.inflateInit2=l;d.inflate=function(b,c){var d,f,g,h,k,l,B,A,v,P,J,G,da,N,I,M,D,F,S,Q,T,Y,O=0,R=new r.Buf8(4),fa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
+!b.output||!b.input&&0!==b.avail_in)return y;d=b.state;12===d.mode&&(d.mode=13);k=b.next_out;g=b.output;B=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;P=l;J=B;T=x;a:for(;;)switch(d.mode){case u:if(0===d.wrap){d.mode=13;break}for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(2&d.wrap&&35615===A){d.check=0;R[0]=255&A;R[1]=A>>>8&255;d.check=t(d.check,R,2,0);v=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";
d.mode=30;break}if(8!==(15&A)){b.msg="unknown compression method";d.mode=30;break}if(A>>>=4,v-=4,Q=(15&A)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<Q;b.adler=d.check=1;d.mode=512&A?10:12;v=A=0;break;case 2:for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(d.flags=A,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";d.mode=30;break}d.head&&(d.head.text=A>>8&1);512&d.flags&&
(R[0]=255&A,R[1]=A>>>8&255,d.check=t(d.check,R,2,0));v=A=0;d.mode=3;case 3:for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.head&&(d.head.time=A);512&d.flags&&(R[0]=255&A,R[1]=A>>>8&255,R[2]=A>>>16&255,R[3]=A>>>24&255,d.check=t(d.check,R,4,0));v=A=0;d.mode=4;case 4:for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.head&&(d.head.xflags=255&A,d.head.os=A>>8);512&d.flags&&(R[0]=255&A,R[1]=A>>>8&255,d.check=t(d.check,R,2,0));v=A=0;d.mode=5;case 5:if(1024&d.flags){for(;16>v;){if(0===l)break a;l--;
A+=f[h++]<<v;v+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(R[0]=255&A,R[1]=A>>>8&255,d.check=t(d.check,R,2,0));v=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(G=d.length,G>l&&(G=l),G&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,h,G,Q)),512&d.flags&&(d.check=t(d.check,f,G,h)),l-=G,h+=G,d.length-=G),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===l)break a;G=0;do Q=f[h+
@@ -150,32 +150,32 @@ G++],d.head&&Q&&65536>d.length&&(d.head.name+=String.fromCharCode(Q));while(Q&&G
A+=f[h++]<<v;v+=8}if(A!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}v=A=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}b.adler=d.check=e(A);v=A=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=k,b.avail_out=B,b.next_in=h,b.avail_in=l,d.hold=A,d.bits=v,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){A>>>=7&v;v-=7&v;d.mode=27;break}for(;3>v;){if(0===
l)break a;l--;A+=f[h++]<<v;v+=8}switch(d.last=1&A,A>>>=1,--v,3&A){case 0:d.mode=14;break;case 1:M=d;if(E){n=new r.Buf32(512);p=new r.Buf32(32);for(N=0;144>N;)M.lens[N++]=8;for(;256>N;)M.lens[N++]=9;for(;280>N;)M.lens[N++]=7;for(;288>N;)M.lens[N++]=8;w(1,M.lens,0,288,n,0,M.work,{bits:9});for(N=0;32>N;)M.lens[N++]=5;w(2,M.lens,0,32,p,0,M.work,{bits:5});E=!1}M.lencode=n;M.lenbits=9;M.distcode=p;M.distbits=5;if(d.mode=20,6===c){A>>>=2;v-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
d.mode=30}A>>>=2;v-=2;break;case 14:A>>>=7&v;for(v-=7&v;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if((65535&A)!==(A>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,v=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(G=d.length){if(G>l&&(G=l),G>B&&(G=B),0===G)break a;r.arraySet(g,f,h,G,k);l-=G;h+=G;B-=G;k+=G;d.length-=G;break}d.mode=12;break;case 17:for(;14>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(d.nlen=(31&A)+257,A>>>=5,v-=5,d.ndist=(31&A)+
-1,A>>>=5,v-=5,d.ncode=(15&A)+4,A>>>=4,v-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.lens[fa[d.have++]]=7&A;A>>>=3;v-=3}for(;19>d.have;)d.lens[fa[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Y={bits:d.lenbits},S=w(0,d.lens,0,19,d.lencode,0,d.work,Y),d.lenbits=Y.bits,S){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<
+1,A>>>=5,v-=5,d.ncode=(15&A)+4,A>>>=4,v-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.lens[fa[d.have++]]=7&A;A>>>=3;v-=3}for(;19>d.have;)d.lens[fa[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Y={bits:d.lenbits},T=w(0,d.lens,0,19,d.lencode,0,d.work,Y),d.lenbits=Y.bits,T){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<
d.nlen+d.ndist;){for(;O=d.lencode[A&(1<<d.lenbits)-1],I=O>>>24,M=65535&O,!(I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(16>M)A>>>=I,v-=I,d.lens[d.have++]=M;else{if(16===M){for(N=I+2;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A>>>=I,v-=I,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];G=3+(3&A);A>>>=2;v-=2}else if(17===M){for(N=I+3;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=I;v-=I;Q=0;G=3+(7&A);A>>>=3;v-=3}else{for(N=I+7;v<N;){if(0===l)break a;l--;
-A+=f[h++]<<v;v+=8}A>>>=I;v-=I;Q=0;G=11+(127&A);A>>>=7;v-=7}if(d.have+G>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;G--;)d.lens[d.have++]=Q}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Y={bits:d.lenbits},S=w(1,d.lens,0,d.nlen,d.lencode,0,d.work,Y),d.lenbits=Y.bits,S){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Y={bits:d.distbits},S=w(2,d.lens,d.nlen,d.ndist,
-d.distcode,0,d.work,Y),d.distbits=Y.bits,S){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=l&&258<=B){b.next_out=k;b.avail_out=B;b.next_in=h;b.avail_in=l;d.hold=A;d.bits=v;z(b,J);k=b.next_out;g=b.output;B=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;O=d.lencode[A&(1<<d.lenbits)-1],I=O>>>24,N=O>>>16&255,M=65535&O,!(I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(N&&0===(240&N)){D=
-I;F=N;for(U=M;O=d.lencode[U+((A&(1<<D+F)-1)>>D)],I=O>>>24,N=O>>>16&255,M=65535&O,!(D+I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=I,v-=I,d.back+=I,d.length=M,0===N){d.mode=26;break}if(32&N){d.back=-1;d.mode=12;break}if(64&N){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&N;d.mode=22;case 22:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=23;
-case 23:for(;O=d.distcode[A&(1<<d.distbits)-1],I=O>>>24,N=O>>>16&255,M=65535&O,!(I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(0===(240&N)){D=I;F=N;for(U=M;O=d.distcode[U+((A&(1<<D+F)-1)>>D)],I=O>>>24,N=O>>>16&255,M=65535&O,!(D+I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=I,v-=I,d.back+=I,64&N){b.msg="invalid distance code";d.mode=30;break}d.offset=M;d.extra=15&N;d.mode=24;case 24:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.offset+=
+A+=f[h++]<<v;v+=8}A>>>=I;v-=I;Q=0;G=11+(127&A);A>>>=7;v-=7}if(d.have+G>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;G--;)d.lens[d.have++]=Q}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Y={bits:d.lenbits},T=w(1,d.lens,0,d.nlen,d.lencode,0,d.work,Y),d.lenbits=Y.bits,T){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Y={bits:d.distbits},T=w(2,d.lens,d.nlen,d.ndist,
+d.distcode,0,d.work,Y),d.distbits=Y.bits,T){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=l&&258<=B){b.next_out=k;b.avail_out=B;b.next_in=h;b.avail_in=l;d.hold=A;d.bits=v;z(b,J);k=b.next_out;g=b.output;B=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;O=d.lencode[A&(1<<d.lenbits)-1],I=O>>>24,N=O>>>16&255,M=65535&O,!(I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(N&&0===(240&N)){D=
+I;F=N;for(S=M;O=d.lencode[S+((A&(1<<D+F)-1)>>D)],I=O>>>24,N=O>>>16&255,M=65535&O,!(D+I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=I,v-=I,d.back+=I,d.length=M,0===N){d.mode=26;break}if(32&N){d.back=-1;d.mode=12;break}if(64&N){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&N;d.mode=22;case 22:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=23;
+case 23:for(;O=d.distcode[A&(1<<d.distbits)-1],I=O>>>24,N=O>>>16&255,M=65535&O,!(I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(0===(240&N)){D=I;F=N;for(S=M;O=d.distcode[S+((A&(1<<D+F)-1)>>D)],I=O>>>24,N=O>>>16&255,M=65535&O,!(D+I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=I,v-=I,d.back+=I,64&N){b.msg="invalid distance code";d.mode=30;break}d.offset=M;d.extra=15&N;d.mode=24;case 24:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.offset+=
A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===B)break a;if(G=J-B,d.offset>G){if(G=d.offset-G,G>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}G>d.wnext?(G-=d.wnext,da=d.wsize-G):da=d.wnext-G;G>d.length&&(G=d.length);N=d.window}else N=g,da=k-d.offset,G=d.length;G>B&&(G=B);B-=G;d.length-=G;do g[k++]=N[da++];while(--G);0===d.length&&(d.mode=21);break;case 26:if(0===B)break a;
-g[k++]=d.length;B--;d.mode=21;break;case 27:if(d.wrap){for(;32>v;){if(0===l)break a;l--;A|=f[h++]<<v;v+=8}if(J-=B,b.total_out+=J,d.total+=J,J&&(b.adler=d.check=d.flags?t(d.check,g,J,k-J):q(d.check,g,J,k-J)),J=B,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}v=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}v=A=0}d.mode=29;case 29:S=1;break a;case 30:S=
+g[k++]=d.length;B--;d.mode=21;break;case 27:if(d.wrap){for(;32>v;){if(0===l)break a;l--;A|=f[h++]<<v;v+=8}if(J-=B,b.total_out+=J,d.total+=J,J&&(b.adler=d.check=d.flags?t(d.check,g,J,k-J):q(d.check,g,J,k-J)),J=B,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}v=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}v=A=0}d.mode=29;case 29:T=1;break a;case 30:T=
-3;break a;case 31:return-4;default:return y}return b.next_out=k,b.avail_out=B,b.next_in=h,b.avail_in=l,d.hold=A,d.bits=v,(d.wsize||J!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,J-b.avail_out)?(d.mode=31,-4):(P-=b.avail_in,J-=b.avail_out,b.total_in+=P,b.total_out+=J,d.total+=J,d.wrap&&J&&(b.adler=d.check=d.flags?t(d.check,g,J,b.next_out-J):q(d.check,g,J,b.next_out-J)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===P&&0===J||4===
-c)&&S===x&&(S=-5),S)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,x)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
+c)&&T===x&&(T=-5),T)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,x)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],k=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,
-25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,p,r,q,t,z){var l,m,n,u,D,F,E,B,A=z.bits,C,L,K,H,V,T,ca=0,W,v=null,P=0,J=new e.Buf16(16);u=new e.Buf16(16);var G=null,da=0;for(C=0;15>=C;C++)J[C]=0;for(L=0;L<p;L++)J[c[d+L]]++;H=A;for(K=15;1<=K&&0===J[K];K--);if(H>K&&(H=K),0===K)return r[q++]=20971520,r[q++]=20971520,z.bits=1,0;for(A=1;A<K&&0===J[A];A++);H<A&&(H=A);for(C=l=1;15>=C;C++)if(l<<=1,l-=J[C],0>l)return-1;if(0<l&&(0===b||1!==K))return-1;u[1]=0;for(C=1;15>C;C++)u[C+1]=u[C]+J[C];
-for(L=0;L<p;L++)0!==c[d+L]&&(t[u[c[d+L]]++]=L);if(0===b?(v=G=t,D=19):1===b?(v=f,P-=257,G=g,da-=257,D=256):(v=h,G=k,D=-1),W=0,L=0,C=A,u=q,V=H,T=0,n=-1,ca=1<<H,p=ca-1,1===b&&852<ca||2===b&&592<ca)return 1;for(var N=0;;){N++;F=C-T;t[L]<D?(E=0,B=t[L]):t[L]>D?(E=G[da+t[L]],B=v[P+t[L]]):(E=96,B=0);l=1<<C-T;A=m=1<<V;do m-=l,r[u+(W>>T)+m]=F<<24|E<<16|B|0;while(0!==m);for(l=1<<C-1;W&l;)l>>=1;if(0!==l?(W&=l-1,W+=l):W=0,L++,0===--J[C]){if(C===K)break;C=c[d+t[L]]}if(C>H&&(W&p)!==n){0===T&&(T=H);u+=A;V=C-T;for(l=
-1<<V;V+T<K&&(l-=J[V+T],!(0>=l));)V++,l<<=1;if(ca+=1<<V,1===b&&852<ca||2===b&&592<ca)return 1;n=W&p;r[n]=H<<24|V<<16|u-q|0}}return 0!==W&&(r[u+W]=C-T<<24|4194304),z.bits=H,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
+25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,p,r,q,t,z){var l,m,n,u,D,F,E,B,A=z.bits,C,L,K,H,V,U,ca=0,W,v=null,P=0,J=new e.Buf16(16);u=new e.Buf16(16);var G=null,da=0;for(C=0;15>=C;C++)J[C]=0;for(L=0;L<p;L++)J[c[d+L]]++;H=A;for(K=15;1<=K&&0===J[K];K--);if(H>K&&(H=K),0===K)return r[q++]=20971520,r[q++]=20971520,z.bits=1,0;for(A=1;A<K&&0===J[A];A++);H<A&&(H=A);for(C=l=1;15>=C;C++)if(l<<=1,l-=J[C],0>l)return-1;if(0<l&&(0===b||1!==K))return-1;u[1]=0;for(C=1;15>C;C++)u[C+1]=u[C]+J[C];
+for(L=0;L<p;L++)0!==c[d+L]&&(t[u[c[d+L]]++]=L);if(0===b?(v=G=t,D=19):1===b?(v=f,P-=257,G=g,da-=257,D=256):(v=h,G=k,D=-1),W=0,L=0,C=A,u=q,V=H,U=0,n=-1,ca=1<<H,p=ca-1,1===b&&852<ca||2===b&&592<ca)return 1;for(var N=0;;){N++;F=C-U;t[L]<D?(E=0,B=t[L]):t[L]>D?(E=G[da+t[L]],B=v[P+t[L]]):(E=96,B=0);l=1<<C-U;A=m=1<<V;do m-=l,r[u+(W>>U)+m]=F<<24|E<<16|B|0;while(0!==m);for(l=1<<C-1;W&l;)l>>=1;if(0!==l?(W&=l-1,W+=l):W=0,L++,0===--J[C]){if(C===K)break;C=c[d+t[L]]}if(C>H&&(W&p)!==n){0===U&&(U=H);u+=A;V=C-U;for(l=
+1<<V;V+U<K&&(l-=J[V+U],!(0>=l));)V++,l<<=1;if(ca+=1<<V,1===b&&852<ca||2===b&&592<ca)return 1;n=W&p;r[n]=H<<24|V<<16|u-q|0}}return 0!==W&&(r[u+W]=C-U<<24|4194304),z.bits=H,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function h(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function k(b,c,d){b.bi_valid>ca-d?(b.bi_buf|=c<<b.bi_valid&65535,h(b,b.bi_buf),b.bi_buf=c>>ca-b.bi_valid,b.bi_valid+=d-ca):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function l(b,c,d){k(b,d[2*c],d[2*c+1])}function m(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;
-while(0<--c);return d>>>1}function n(b,c,d){var e,f=Array(T+1),g=0;for(e=1;e<=T;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function p(b){var c;for(c=0;c<L;c++)b.dyn_ltree[2*c]=0;for(c=0;c<K;c++)b.dyn_dtree[2*c]=0;for(c=0;c<H;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*W]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?h(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=2*c,g=2*d;
-return b[f]<b[g]||b[f]===b[g]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function z(b,c,d){var e,f,g,h,m=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===e?l(b,f,c):(g=U[f],l(b,g+C+1,c),h=G[g],0!==h&&(f-=Q[g],k(b,f,h)),e--,g=256>e?ea[e]:ea[256+(e>>>7)],l(b,g,d),h=da[g],0!==h&&
-(e-=S[g],k(b,e,h)));while(m<b.last_lit)}l(b,W,c)}function w(b,c){var d,e,f,g=c.dyn_tree;e=c.stat_desc.static_tree;var h=c.stat_desc.has_stree,k=c.stat_desc.elems,l=-1;b.heap_len=0;b.heap_max=V;for(d=0;d<k;d++)0!==g[2*d]?(b.heap[++b.heap_len]=l=d,b.depth[d]=0):g[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>l?++l:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,h&&(b.static_len-=e[2*f+1]);c.max_code=l;for(d=b.heap_len>>1;1<=d;d--)t(b,g,d);f=k;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),e=b.heap[1],
-b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,v,h=c.dyn_tree,k=c.max_code,p=c.stat_desc.static_tree,q=c.stat_desc.has_stree,r=c.stat_desc.extra_bits,J=c.stat_desc.extra_base,P=c.stat_desc.max_length,G=0;for(e=0;e<=T;e++)b.bl_count[e]=0;h[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<V;d++)f=b.heap[d],e=h[2*h[2*f+1]+1]+
+while(0<--c);return d>>>1}function n(b,c,d){var e,f=Array(U+1),g=0;for(e=1;e<=U;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function p(b){var c;for(c=0;c<L;c++)b.dyn_ltree[2*c]=0;for(c=0;c<K;c++)b.dyn_dtree[2*c]=0;for(c=0;c<H;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*W]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?h(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=2*c,g=2*d;
+return b[f]<b[g]||b[f]===b[g]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function z(b,c,d){var e,f,g,h,m=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===e?l(b,f,c):(g=S[f],l(b,g+C+1,c),h=G[g],0!==h&&(f-=Q[g],k(b,f,h)),e--,g=256>e?ea[e]:ea[256+(e>>>7)],l(b,g,d),h=da[g],0!==h&&
+(e-=T[g],k(b,e,h)));while(m<b.last_lit)}l(b,W,c)}function w(b,c){var d,e,f,g=c.dyn_tree;e=c.stat_desc.static_tree;var h=c.stat_desc.has_stree,k=c.stat_desc.elems,l=-1;b.heap_len=0;b.heap_max=V;for(d=0;d<k;d++)0!==g[2*d]?(b.heap[++b.heap_len]=l=d,b.depth[d]=0):g[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>l?++l:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,h&&(b.static_len-=e[2*f+1]);c.max_code=l;for(d=b.heap_len>>1;1<=d;d--)t(b,g,d);f=k;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),e=b.heap[1],
+b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,v,h=c.dyn_tree,k=c.max_code,p=c.stat_desc.static_tree,q=c.stat_desc.has_stree,r=c.stat_desc.extra_bits,J=c.stat_desc.extra_base,P=c.stat_desc.max_length,G=0;for(e=0;e<=U;e++)b.bl_count[e]=0;h[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<V;d++)f=b.heap[d],e=h[2*h[2*f+1]+1]+
1,e>P&&(e=P,G++),h[2*f+1]=e,f>k||(b.bl_count[e]++,m=0,f>=J&&(m=r[f-J]),v=h[2*f],b.opt_len+=v*(e+m),q&&(b.static_len+=v*(p[2*f+1]+m)));if(0!==G){do{for(e=P-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[P]--;G-=2}while(0<G);for(e=P;0!==e;e--)for(f=b.bl_count[e];0!==f;)m=b.heap[--d],m>k||(h[2*m+1]!==e&&(b.opt_len+=(e-h[2*m+1])*h[2*m],h[2*m+1]=e),f--)}n(g,l,b.bl_count)}function x(b,c,d){var e,f,g=-1,h=c[1],k=0,l=7,m=4;0===h&&(l=138,m=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=h,
h=c[2*(e+1)+1],++k<l&&f===h||(k<m?b.bl_tree[2*f]+=k:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*v]++):10>=k?b.bl_tree[2*P]++:b.bl_tree[2*J]++,k=0,g=f,0===h?(l=138,m=3):f===h?(l=6,m=3):(l=7,m=4))}function y(b,c,d){var e,f,g=-1,h=c[1],m=0,n=7,p=4;0===h&&(n=138,p=3);for(e=0;e<=d;e++)if(f=h,h=c[2*(e+1)+1],!(++m<n&&f===h)){if(m<p){do l(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(l(b,f,b.bl_tree),m--),l(b,v,b.bl_tree),k(b,m-3,2)):10>=m?(l(b,P,b.bl_tree),k(b,m-3,3)):(l(b,J,b.bl_tree),k(b,m-11,7));m=
-0;g=f;0===h?(n=138,p=3):f===h?(n=6,p=3):(n=7,p=4)}}function u(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return B;for(c=32;c<C;c++)if(0!==b.dyn_ltree[2*c])return B;return E}function D(b,c,d,e){k(b,(A<<1)+(e?1:0),3);r(b);h(b,d);h(b,~d);F.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var F=b("../utils/common"),E=0,B=1,A=0,C=256,L=C+1+29,K=30,H=19,V=2*L+1,T=15,ca=16,W=256,v=16,P=17,
-J=18,G=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],da=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=Array(2*(L+2));e(M);var aa=Array(2*K);e(aa);var ea=Array(512);e(ea);var U=Array(256);e(U);var Q=Array(29);e(Q);var S=Array(K);e(S);var Y,O,R,fa=!1;d._tr_init=function(b){if(!fa){var c,d,e,h=Array(T+1);for(e=d=0;28>e;e++)for(Q[e]=d,c=0;c<1<<G[e];c++)U[d++]=e;U[d-1]=e;
-for(e=d=0;16>e;e++)for(S[e]=d,c=0;c<1<<da[e];c++)ea[d++]=e;for(d>>=7;e<K;e++)for(S[e]=d<<7,c=0;c<1<<da[e]-7;c++)ea[256+d++]=e;for(c=0;c<=T;c++)h[c]=0;for(c=0;143>=c;)M[2*c+1]=8,c++,h[8]++;for(;255>=c;)M[2*c+1]=9,c++,h[9]++;for(;279>=c;)M[2*c+1]=7,c++,h[7]++;for(;287>=c;)M[2*c+1]=8,c++,h[8]++;n(M,L+1,h);for(c=0;c<K;c++)aa[2*c+1]=5,aa[2*c]=m(c,5);Y=new f(M,G,C+1,L,T);O=new f(aa,da,0,K,T);R=new f([],N,0,H,7);fa=!0}b.l_desc=new g(b.dyn_ltree,Y);b.d_desc=new g(b.dyn_dtree,O);b.bl_desc=new g(b.bl_tree,
+0;g=f;0===h?(n=138,p=3):f===h?(n=6,p=3):(n=7,p=4)}}function u(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return B;for(c=32;c<C;c++)if(0!==b.dyn_ltree[2*c])return B;return E}function D(b,c,d,e){k(b,(A<<1)+(e?1:0),3);r(b);h(b,d);h(b,~d);F.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var F=b("../utils/common"),E=0,B=1,A=0,C=256,L=C+1+29,K=30,H=19,V=2*L+1,U=15,ca=16,W=256,v=16,P=17,
+J=18,G=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],da=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=Array(2*(L+2));e(M);var aa=Array(2*K);e(aa);var ea=Array(512);e(ea);var S=Array(256);e(S);var Q=Array(29);e(Q);var T=Array(K);e(T);var Y,O,R,fa=!1;d._tr_init=function(b){if(!fa){var c,d,e,h=Array(U+1);for(e=d=0;28>e;e++)for(Q[e]=d,c=0;c<1<<G[e];c++)S[d++]=e;S[d-1]=e;
+for(e=d=0;16>e;e++)for(T[e]=d,c=0;c<1<<da[e];c++)ea[d++]=e;for(d>>=7;e<K;e++)for(T[e]=d<<7,c=0;c<1<<da[e]-7;c++)ea[256+d++]=e;for(c=0;c<=U;c++)h[c]=0;for(c=0;143>=c;)M[2*c+1]=8,c++,h[8]++;for(;255>=c;)M[2*c+1]=9,c++,h[9]++;for(;279>=c;)M[2*c+1]=7,c++,h[7]++;for(;287>=c;)M[2*c+1]=8,c++,h[8]++;n(M,L+1,h);for(c=0;c<K;c++)aa[2*c+1]=5,aa[2*c]=m(c,5);Y=new f(M,G,C+1,L,U);O=new f(aa,da,0,K,U);R=new f([],N,0,H,7);fa=!0}b.l_desc=new g(b.dyn_ltree,Y);b.d_desc=new g(b.dyn_dtree,O);b.bl_desc=new g(b.bl_tree,
R);b.bi_buf=0;b.bi_valid=0;p(b)};d._tr_stored_block=D;d._tr_flush_block=function(b,c,d,e){var f,g,h=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=u(b));w(b,b.l_desc);w(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);w(b,b.bl_desc);for(h=H-1;3<=h&&0===b.bl_tree[2*I[h]+1];h--);h=(b.opt_len+=3*(h+1)+14,h);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=d+5;if(d+4<=f&&-1!==c)D(b,c,d,e);else if(4===b.strategy||g===f)k(b,2+(e?1:0),3),z(b,M,aa);
-else{k(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;h+=1;k(b,c-257,5);k(b,d-1,5);k(b,h-4,4);for(f=0;f<h;f++)k(b,b.bl_tree[2*I[f]+1],3);y(b,b.dyn_ltree,c-1);y(b,b.dyn_dtree,d-1);z(b,b.dyn_ltree,b.dyn_dtree)}p(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(U[d]+C+1)]++,b.dyn_dtree[2*(256>
+else{k(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;h+=1;k(b,c-257,5);k(b,d-1,5);k(b,h-4,4);for(f=0;f<h;f++)k(b,b.bl_tree[2*I[f]+1],3);y(b,b.dyn_ltree,c-1);y(b,b.dyn_dtree,d-1);z(b,b.dyn_ltree,b.dyn_dtree)}p(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(S[d]+C+1)]++,b.dyn_dtree[2*(256>
c?ea[c]:ea[256+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){k(b,2,3);l(b,W,M);16===b.bi_valid?(h(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,
c,d){d=b("./lib/utils/common").assign;var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var JSON;JSON||(JSON={});
(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,l,m,t=f,z,w=d[a];w&&"object"===typeof w&&"function"===typeof w.toJSON&&(w=w.toJSON(a));"function"===typeof k&&(w=k.call(d,a,w));switch(typeof w){case "string":return b(w);case "number":return isFinite(w)?""+w:"null";case "boolean":case "null":return""+w;
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.43",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.1.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&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/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,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/")||
@@ -1711,7 +1711,7 @@ new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return t
v=mxUtils.createXmlDocument(),q=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"svg"):v.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+a));null==v.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/p;var r=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),t=Math.max(1,Math.ceil(n.height*
a)+2*c)+(l?5:0);q.setAttribute("version","1.1");q.setAttribute("width",r+"px");q.setAttribute("height",t+"px");q.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+r+" "+t);v.appendChild(q);var u=this.createSvgCanvas(q);u.foOffset=e?-.5:0;u.textOffset=e?-.5:0;u.imageOffset=e?-.5:0;u.translate(Math.floor((c/b-n.x)/p),Math.floor((c/b-n.y)/p));var J=document.createElement("textarea"),P=u.createAlternateContent;u.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,p){var v=this.state;if(null!=this.foAltText&&
(0==d||0!=v.fontSize&&f.length<5*d/v.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+v.fontSize)/2));q.setAttribute("fill",v.fontColor||"black");q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(v.fontSize)+"px");q.setAttribute("font-family",v.fontFamily);(v.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(v.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
-q.setAttribute("font-style","italic");(v.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");try{return J.innerHTML=f,q.textContent=J.value,q}catch(ga){return P.apply(this,arguments)}}else return P.apply(this,arguments)};var w=this.backgroundImage;if(null!=w){b=p/b;var x=this.view.translate,y=new mxRectangle(x.x*b,x.y*b,w.width*b,w.height*b);mxUtils.intersects(n,y)&&u.image(x.x,x.y,w.width,w.height,w.src,!0)}u.scale(a);u.textEnabled=g;h=
+q.setAttribute("font-style","italic");(v.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");try{return J.innerHTML=f,q.textContent=J.value,q}catch(ha){return P.apply(this,arguments)}}else return P.apply(this,arguments)};var w=this.backgroundImage;if(null!=w){b=p/b;var x=this.view.translate,y=new mxRectangle(x.x*b,x.y*b,w.width*b,w.height*b);mxUtils.intersects(n,y)&&u.image(x.x,x.y,w.width,w.height,w.src,!0)}u.scale(a);u.textEnabled=g;h=
null!=h?h:this.createSvgImageExport();var G=h.drawCellState;h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&G.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),u);this.updateSvgLinks(q,k,!0);return q}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");
for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&
(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",
@@ -1783,18 +1783,18 @@ this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.grap
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var K=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){K.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var H=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
function(){H.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var V=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){V.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
-null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var T=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(T.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
+null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var U=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(U.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var ca=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ca.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var W=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){W.apply(this,arguments);null!=this.linkHint&&
(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function h(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function q(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function x(){mxActor.call(this)}function y(){mxActor.call(this)}function u(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function E(){mxShape.call(this)}function B(){mxShape.call(this)}
-function A(){mxEllipse.call(this)}function C(){mxShape.call(this)}function L(){mxShape.call(this)}function K(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function V(){mxShape.call(this)}function T(){mxShape.call(this)}function ca(){mxShape.call(this)}function W(){mxShape.call(this)}function v(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function J(){mxDoubleEllipse.call(this)}function G(){mxArrowConnector.call(this);this.spacing=0}function da(){mxArrowConnector.call(this);
-this.spacing=0}function N(){mxActor.call(this)}function I(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}function aa(){mxActor.call(this)}function ea(){mxActor.call(this)}function U(){mxActor.call(this)}function Q(){mxActor.call(this)}function S(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function fa(){mxActor.call(this)}function X(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
-function wa(){mxRhombus.call(this)}function xa(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function na(){mxActor.call(this)}function la(){mxActor.call(this)}function ma(){mxActor.call(this)}function ja(){mxConnector.call(this)}function Ca(a,b,c,d,e,f,g,h,k,l){g+=k;var m=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(m.x-e-g,m.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+function A(){mxEllipse.call(this)}function C(){mxShape.call(this)}function L(){mxShape.call(this)}function K(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function V(){mxShape.call(this)}function U(){mxShape.call(this)}function ca(){mxShape.call(this)}function W(){mxShape.call(this)}function v(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function J(){mxDoubleEllipse.call(this)}function G(){mxArrowConnector.call(this);this.spacing=0}function da(){mxArrowConnector.call(this);
+this.spacing=0}function N(){mxActor.call(this)}function I(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}function aa(){mxActor.call(this)}function ea(){mxActor.call(this)}function S(){mxActor.call(this)}function Q(){mxActor.call(this)}function T(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function fa(){mxActor.call(this)}function X(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
+function xa(){mxRhombus.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}function pa(){mxActor.call(this)}function na(){mxActor.call(this)}function oa(){mxActor.call(this)}function ka(){mxConnector.call(this)}function Da(a,b,c,d,e,f,g,h,k,l){g+=k;var ma=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(ma.x-e-g,ma.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),h=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,
f);a.lineTo(d,e);a.lineTo(f,e);a.lineTo(0,e-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-f,0),a.lineTo(d,f),a.lineTo(f,f),a.close(),a.fill()),0!=h&&(a.setFillAlpha(Math.abs(h)),a.setFillColor(0>h?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,e),a.lineTo(0,e-f),a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,
-0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Aa=Math.tan(mxUtils.toRadians(30)),ka=(.5-Aa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Aa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*
-b,b*ka);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ka)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Aa));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-ka)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ka)*b),a.lineTo(.5*b,(1-ka)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ka),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ka)*b),a.lineTo(0,
+0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Ba=Math.tan(mxUtils.toRadians(30)),la=(.5-Ba)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Ba);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*
+b,b*la);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-la)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Ba));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-la)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-la)*b),a.lineTo(.5*b,(1-la)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*la),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-la)*b),a.lineTo(0,
.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",c);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,
b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(e,mxCylinder);e.prototype.size=30;e.prototype.darkOpacity=0;e.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),
g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.end(),a.stroke())};
@@ -1803,7 +1803,7 @@ c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.
30;h.prototype.isRoundable=function(){return!0};h.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",h);mxUtils.extend(k,mxActor);k.prototype.size=.4;k.prototype.redrawPath=
function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==
mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",k);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var Ga=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Ga.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var Ha=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Ha.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.isRoundable=function(){return!0};n.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",n);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,
@@ -1811,10 +1811,10 @@ e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRend
b;this.firstX=a;this.firstY=b};q.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};q.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};q.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};q.prototype.arcTo=function(a,b,c,d,
e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var k=c(a-this.lastX)*d/g,c=c(b-this.lastY)*e/g,
d=d/f,e=e/f,f=0;f<g;f++){var l=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,k*f+this.lastX-l*e,c*f+this.lastY-l*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
-var Ha=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ha.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ia=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
-this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ia.apply(this,arguments)};var Ja=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ja.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||
+var Ia=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ia.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ja=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
+this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ja.apply(this,arguments)};var Ka=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ka.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||
(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f),
-a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var La=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&La.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};t.prototype.paintForeground=
function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",t);mxUtils.extend(z,
mxRectangleShape);z.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};z.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",z);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable=
@@ -1822,17 +1822,17 @@ function(){return!0};w.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getVal
this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(x,mxActor);x.prototype.size=.2;x.prototype.fixedSize=20;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",x);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(u,mxRectangleShape);u.prototype.isHtmlAllowed=function(){return!1};u.prototype.paintForeground=function(a,
-b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",u);var Da=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Da.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Da.apply(this,[a,b,c,d,e]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
+b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",u);var Ea=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ea.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ea.apply(this,[a,b,c,d,e]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};D.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+
-f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],l=this.style["symbol"+f+"Width"],m=this.style["symbol"+f+"Height"],ra=this.style["symbol"+f+"Spacing"]||0,n=this.style["symbol"+f+"VSpacing"]||ra,p=this.style["symbol"+f+"ArcSpacing"];null!=p&&(p*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),ra+=p,n+=p);var p=b,q=c,p=h==mxConstants.ALIGN_CENTER?p+(d-l)/2:h==mxConstants.ALIGN_RIGHT?p+(d-l-ra):p+ra,q=k==mxConstants.ALIGN_MIDDLE?q+(e-m)/2:k==mxConstants.ALIGN_BOTTOM?
-q+(e-m-n):q+n;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,p,q,l,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(E,mxShape);
-E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",E);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,
-b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",A);mxUtils.extend(C,
-mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",C);mxUtils.extend(L,mxShape);L.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};L.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};
-L.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",L);mxUtils.extend(K,mxRectangleShape);K.prototype.size=40;K.prototype.isHtmlAllowed=function(){return!1};K.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};K.prototype.paintBackground=function(a,b,c,d,
-e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=K&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};K.prototype.paintForeground=function(a,
-b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",K);mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],l=this.style["symbol"+f+"Width"],m=this.style["symbol"+f+"Height"],ma=this.style["symbol"+f+"Spacing"]||0,n=this.style["symbol"+f+"VSpacing"]||ma,ga=this.style["symbol"+f+"ArcSpacing"];null!=ga&&(ga*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),ma+=ga,n+=ga);var ga=b,p=c,ga=h==mxConstants.ALIGN_CENTER?ga+(d-l)/2:h==mxConstants.ALIGN_RIGHT?ga+(d-l-ma):ga+ma,p=k==mxConstants.ALIGN_MIDDLE?p+(e-m)/
+2:k==mxConstants.ALIGN_BOTTOM?p+(e-m-n):p+n;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,ga,p,l,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
+F);mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",E);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=
+function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
+A);mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",C);mxUtils.extend(L,mxShape);L.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};L.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
+e/8,d,7*e/8);a.fillAndStroke()};L.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",L);mxUtils.extend(K,mxRectangleShape);K.prototype.size=40;K.prototype.isHtmlAllowed=function(){return!1};K.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};K.prototype.paintBackground=
+function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=K&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};K.prototype.paintForeground=
+function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",K);mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
"height",this.height)*this.scale))};H.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",H);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=K.prototype.size;
null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
@@ -1846,8 +1846,8 @@ Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),n
Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+l),new mxPoint(g+e,h+l),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(m,h),new mxPoint(g+k,h+e),new mxPoint(g+k,h+l),new mxPoint(m,h+l-e),new mxPoint(g,h+l),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(m,h+e),new mxPoint(g+
k,h),new mxPoint(g+k,h+l-e),new mxPoint(m,h+l),new mxPoint(g,h+l-e),new mxPoint(g,h)]);m=new mxPoint(m,a);d&&(c.x<g||c.x>g+k?m.y=c.y:m.x=c.x);return mxUtils.getPerimeterPoint(h,m,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+
-h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(V,mxShape);V.prototype.size=10;V.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",V);mxUtils.extend(T,mxShape);T.prototype.size=
-10;T.prototype.inset=2;T.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",T);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=
+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(V,mxShape);V.prototype.size=10;V.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",V);mxUtils.extend(U,mxShape);U.prototype.size=
+10;U.prototype.inset=2;U.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",U);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=
function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ca);mxUtils.extend(W,mxShape);W.prototype.inset=2;W.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
W);mxUtils.extend(v,mxCylinder);v.prototype.jettyWidth=32;v.prototype.jettyHeight=12;v.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",v);mxUtils.extend(P,mxDoubleEllipse);P.prototype.outerStroke=!0;P.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",P);
@@ -1858,83 +1858,102 @@ I.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paint
a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",I);mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",M);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",aa);mxUtils.extend(ea,mxActor);ea.prototype.dx=20;ea.prototype.dy=20;ea.prototype.redrawPath=
function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,
-c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ea);mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",U);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize))));c=(e-f)/2;var f=
-c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",Q);mxUtils.extend(S,mxActor);S.prototype.size=.1;S.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",S);mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",Y);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();
+c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ea);mxUtils.extend(S,mxActor);S.prototype.arrowWidth=.3;S.prototype.arrowSize=.2;S.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",S);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize))));c=(e-f)/2;var f=
+c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",Q);mxUtils.extend(T,mxActor);T.prototype.size=.1;T.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",T);mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",Y);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();
a.end()};mxCellRenderer.registerShape("xor",O);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);
a.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};
mxCellRenderer.registerShape("offPageConnector",fa);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();
-a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Z);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(wa,
-mxRhombus);wa.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",wa);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};
-mxCellRenderer.registerShape("collate",xa);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ya);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=
+a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Z);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(xa,
+mxRhombus);xa.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};
+mxCellRenderer.registerShape("collate",ya);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",za);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=
function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&
-a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",za);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",qa);mxUtils.extend(na,mxActor);na.prototype.redrawPath=
-function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",na);mxUtils.extend(la,mxActor);la.prototype.size=.2;la.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,
-c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",la);mxUtils.extend(ma,mxActor);ma.prototype.size=.25;ma.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",ma);mxUtils.extend(ja,
-mxConnector);ja.prototype.origPaintEdgeShape=ja.prototype.paintEdgeShape;ja.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;ja.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),ja.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",
-ja);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+
-n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ca);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Ca.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);return function(){n.apply(this,
+a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Aa);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",sa);mxUtils.extend(pa,mxActor);pa.prototype.redrawPath=
+function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",pa);mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,
+c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",na);mxUtils.extend(oa,mxActor);oa.prototype.size=.25;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",oa);mxUtils.extend(ka,
+mxConnector);ka.prototype.origPaintEdgeShape=ka.prototype.paintEdgeShape;ka.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;ka.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),ka.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",
+ka);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+
+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Da);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Da.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);return function(){n.apply(this,
arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*k,m.y-2*q+f*k);a.moveTo(m.x-p-q+f*k,m.y-q+p-e*k);a.lineTo(m.x+q-p-f*k,m.y-q-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",
-function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,b,c){return ga(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=
-Math.round(2*b)/a.view.scale-c})},ga=function(a,b,c,d,e){return ba(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,n=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
-n,h/n,m/n,l,g,d,f)})},ia=function(a){return function(b){return[ba(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
-Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ba=function(a,b,c){return function(d){var e=[ba(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ha(d));return e}},sa=function(a,b,c,d,e){c=null!=
+function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Fa=function(a,b,c){return ha(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=
+Math.round(2*b)/a.view.scale-c})},ha=function(a,b,c,d,e){return ba(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,n=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
+n,h/n,m/n,l,g,d,f)})},ja=function(a){return function(b){return[ba(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",S.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",S.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
+Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ca=function(a,b,c){return function(d){var e=[ba(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ia(d));return e}},ta=function(a,b,c,d,e){c=null!=
c?c:1;return function(f){var g=[ba(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=
-a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ha(f));return g}},Fa=function(a){return function(b){var c=[ba(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ha(b));return c}},oa=function(){return function(a){var b=
-[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b}},ha=function(a,b){return ba(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/
+a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ia(f));return g}},Ga=function(a){return function(b){var c=[ba(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ia(b));return c}},qa=function(){return function(a){var b=
+[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b}},ia=function(a,b){return ba(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/
100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},ba=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);
-g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ta={link:function(a){return[Ea(a,!0,10),Ea(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ga(a,
+g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ua={link:function(a){return[Fa(a,!0,10),Fa(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ha(a,
["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=
-Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ga(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ha(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ga(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*
+parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ha(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*
a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
-b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ga(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=
+b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ha(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=
Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[ba(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),
-b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ha(a,c/2))}return b},
-label:oa(),ext:oa(),rectangle:oa(),triangle:oa(),rhombus:oa(),umlLifeline:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[ba(a,["width","height"],function(a){var b=Math.max(H.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ia(a,c/2))}return b},
+label:qa(),ext:qa(),rectangle:qa(),triangle:qa(),rhombus:qa(),umlLifeline:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[ba(a,["width","height"],function(a){var b=Math.max(H.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
"width",H.prototype.width))),c=Math.max(1.5*H.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",H.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(H.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*H.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[ba(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},cross:function(a){return[ba(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",la.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},cross:function(a){return[ba(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",na.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
-[ba(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",N.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},dataStorage:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));
+[ba(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",N.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},dataStorage:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));
return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[ba(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),ba(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
(b.x-a.x)/a.width)))/100}),ba(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},internalStorage:function(a){var b=[ba(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",I.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",I.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
-b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},corner:function(a){return[ba(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",M.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},internalStorage:function(a){var b=[ba(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",I.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",I.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},corner:function(a){return[ba(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",M.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[ba(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ea.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ea.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,b.y-a.y)))})]},singleArrow:ia(1),doubleArrow:ia(.5),folder:function(a){return[ba(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
+Math.min(a.height,b.y-a.y)))})]},singleArrow:ja(1),doubleArrow:ja(.5),folder:function(a){return[ba(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));
-return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:sa(x.prototype.size,!0,null,!0,x.prototype.fixedSize),hexagon:sa(y.prototype.size,!0,.5,!0),curlyBracket:sa(p.prototype.size,!1),display:sa(ma.prototype.size,!1),cube:Ba(1,a.prototype.size,!1),card:Ba(.5,h.prototype.size,!0),loopLimit:Ba(.5,R.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=ba;Graph.handleFactory=ta;mxVertexHandler.prototype.createCustomHandles=
-function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=ta[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=ta[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
-this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=ta[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ua=new mxPoint(1,0),va=new mxPoint(1,0),ia=mxUtils.toRadians(-30),ua=mxUtils.getRotatedPoint(ua,Math.cos(ia),Math.sin(ia)),ia=mxUtils.toRadians(-150),va=mxUtils.getRotatedPoint(va,Math.cos(ia),Math.sin(ia));mxEdgeStyle.IsometricConnector=function(a,b,
-c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ua.x,l=ua.y,m=va.x,n=va.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*
-b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var La=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return La.apply(this,
-arguments)};b.prototype.constraints=[];c.prototype.constraints=[];w.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
-.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
-1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;
-a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;N.prototype.constraints=
-mxRectangleShape.prototype.constraints;na.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,
-.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,
-0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,
-0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,
-.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];V.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ta(x.prototype.size,!0,null,!0,x.prototype.fixedSize),hexagon:ta(y.prototype.size,!0,.5,!0),curlyBracket:ta(p.prototype.size,!1),display:ta(oa.prototype.size,!1),cube:Ca(1,a.prototype.size,!1),card:Ca(.5,h.prototype.size,!0),loopLimit:Ca(.5,R.prototype.size,!0),trapezoid:Ga(.5),parallelogram:Ga(1)};Graph.createHandle=ba;Graph.handleFactory=ua;mxVertexHandler.prototype.createCustomHandles=
+function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=ua[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=ua[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
+this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=ua[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ja=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ja),Math.sin(ja)),ja=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ja),Math.sin(ja));mxEdgeStyle.IsometricConnector=function(a,b,
+c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=va.x,l=va.y,m=wa.x,n=wa.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*
+b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ma=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Ma.apply(this,
+arguments)};b.prototype.constraints=[];c.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,
+"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),
+!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,
+1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.constraints=mxRectangleShape.prototype.constraints;
+e.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};h.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(c-d)));return a};g.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;sa.prototype.constraints=mxEllipse.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;
+pa.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};R.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,
+.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
+.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,
+.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,
+.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
+1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,
.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ea.prototype.constraints=null;M.prototype.constraints=null;aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];K.prototype.constraints=null;Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ea.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};M.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+1),!1)];S.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};Q.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",S.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,c));return a};na.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,f=d+e,g=(b-e)/2,e=g+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};K.prototype.constraints=null;Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,
+.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();
(function(x,r){function N(){if(!t){t=!0;window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config({jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<p.length;a++)MathJax.Hub.Queue(["Typeset",MathJax.Hub,
p[a]])})}};var a=document.createElement("script");a.type="text/javascript";a.src="https://math.draw.io/current/MathJax.js?config=TeX-MML-AM_HTMLorMML";document.getElementsByTagName("head")[0].appendChild(a)}}function O(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?MathJax.Hub.Queue(["Typeset",MathJax.Hub,a.container]):p.push(a.container);a.addListener(mxEvent.SIZE,function(e,m){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,
a.container])})}mxStencilRegistry.dynamicLoading=!1;try{var e=document.createElement("style");e.type="text/css";e.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}";document.getElementsByTagName("head")[0].appendChild(e)}catch(a){}var G=
diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js
index f762ee4c..f6768fcc 100644
--- a/src/main/webapp/js/extensions.min.js
+++ b/src/main/webapp/js/extensions.min.js
@@ -494,12 +494,12 @@ a.style[mxConstants.STYLE_FILLCOLOR];if(n&&"none"!=n){if(d.appendChild(b("FillFo
10;break;case "1 2":c=3;break;case "1 4":c=17}d.appendChild(b("LinePattern",c,h))}1==a.style[mxConstants.STYLE_SHADOW]&&(d.appendChild(b("ShdwPattern",1,h)),d.appendChild(b("ShdwForegnd","#000000",h)),d.appendChild(b("ShdwForegndTrans",.6,h)),d.appendChild(b("ShapeShdwType",1,h)),d.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",h)),d.appendChild(b("ShapeShdwOffsetY","-0.02946278254943948",h)),d.appendChild(b("ShapeShdwScaleFactor","1",h)),d.appendChild(b("ShapeShdwBlur","0.05555555555555555",
h)),d.appendChild(b("ShapeShdwShow",2,h)));1==a.style[mxConstants.STYLE_FLIPH]&&d.appendChild(b("FlipX",1,h));1==a.style[mxConstants.STYLE_FLIPV]&&d.appendChild(b("FlipY",1,h));1==a.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(f("Rounding",.1*a.cell.geometry.width,h));(a=a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(b("TextBkgnd",a,h))}function h(a,b,d,h,n){var c=l(d,D.XMLNS,"Shape");c.setAttribute("ID",a);c.setAttribute("NameU","Shape"+a);c.setAttribute("LineStyle","0");c.setAttribute("FillStyle",
"0");c.setAttribute("TextStyle","0");a=b.width/2;var A=b.height/2;c.appendChild(f("PinX",b.x+a+(n?0:B.shiftX),d));c.appendChild(f("PinY",h-b.y-A-(n?0:B.shiftY),d));c.appendChild(f("Width",b.width,d));c.appendChild(f("Height",b.height,d));c.appendChild(f("LocPinX",a,d));c.appendChild(f("LocPinY",A,d));return c}function n(a,b){var d=D.ARROWS_MAP[(null==a?"none":a)+"|"+(null==b?"1":b)];return null!=d?d:1}function A(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a?3:9>=a?4:22>=a?5:6}function x(h,c,x,E,m){var w=
-c.view.getState(h,!0);if(null==w)return null;c=l(x,D.XMLNS,"Shape");var z=g(h.id);c.setAttribute("ID",z);c.setAttribute("NameU","Dynamic connector."+z);c.setAttribute("Name","Dynamic connector."+z);c.setAttribute("Type","Shape");c.setAttribute("Master","4");var p=B.state,z=w.absolutePoints,I=w.cellBounds,G=I.width/2,F=I.height/2;c.appendChild(f("PinX",I.x+G,x));c.appendChild(f("PinY",E-I.y-F,x));c.appendChild(f("Width",I.width,x));c.appendChild(f("Height",I.height,x));c.appendChild(f("LocPinX",G,
-x));c.appendChild(f("LocPinY",F,x));B.newEdge(c,w,x);G=function(a,b){var d=a.x,h=a.y,d=d*p.scale-I.x+p.dx+(m?0:B.shiftX),h=(b?0:I.height)-h*p.scale+I.y-p.dy-(m?0:B.shiftY);return{x:d,y:h}};F=G(z[0],!0);c.appendChild(f("BeginX",I.x+F.x,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));c.appendChild(f("BeginY",E-I.y+F.y,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));F=G(z[z.length-1],!0);c.appendChild(f("EndX",I.x+F.x,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));c.appendChild(f("EndY",
-E-I.y+F.y,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));c.appendChild(b("BegTrigger","2",x,h.source?"_XFTRIGGER(Sheet."+g(h.source.id)+"!EventXFMod)":null));c.appendChild(b("EndTrigger","2",x,h.target?"_XFTRIGGER(Sheet."+g(h.target.id)+"!EventXFMod)":null));c.appendChild(b("ConFixedCode","6",x));c.appendChild(b("LayerMember","0",x));d(w,c,x);E=w.style[mxConstants.STYLE_STARTSIZE];h=n(w.style[mxConstants.STYLE_STARTARROW],w.style[mxConstants.STYLE_STARTFILL]);c.appendChild(b("BeginArrow",h,
-x));c.appendChild(b("BeginArrowSize",A(E),x));E=w.style[mxConstants.STYLE_ENDSIZE];h=n(w.style[mxConstants.STYLE_ENDARROW],w.style[mxConstants.STYLE_ENDFILL]);c.appendChild(b("EndArrow",h,x));c.appendChild(b("EndArrowSize",A(E),x));null!=w.text&&w.text.checkBounds()&&(B.save(),w.text.paint(B),B.restore());w=l(x,D.XMLNS,"Section");w.setAttribute("N","Geometry");w.setAttribute("IX","0");for(h=0;h<z.length;h++)E=G(z[h]),w.appendChild(a(0==h?"MoveTo":"LineTo",h+1,E.x,E.y,x));w.appendChild(b("NoFill",
-"1",x));w.appendChild(b("NoLine","0",x));c.appendChild(w);return c}function E(a,b,n,c,f,A){var m=a.geometry;if(null!=m){m.relative&&f&&(m=m.clone(),m.x*=f.width,m.y*=f.height,m.relative=0);f=g(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){c=h(f+"10000",m,n,c,A);c.setAttribute("Type","Group");A=l(n,D.XMLNS,"Shapes");B.save();B.translate(-m.x,-m.y);f=m.clone();f.x=0;f.y=0;a.setGeometry(f);a.treatAsSingle=!0;f=E(a,b,n,m.height,m,!0);a.treatAsSingle=!1;a.setGeometry(m);A.appendChild(f);for(var w=0;w<
-a.children.length;w++)f=E(a.children[w],b,n,m.height,m,!0),A.appendChild(f);c.appendChild(A);B.restore();return c}return a.vertex?(c=h(f,m,n,c,A),a=b.view.getState(a,!0),d(a,c,n),B.newShape(c,a,n),null!=a.text&&a.text.checkBounds()&&(B.save(),a.text.paint(B),B.restore()),null!=a.shape&&a.shape.checkBounds()&&(B.save(),a.shape.paint(B),B.restore()),c.appendChild(B.getShapeGeo()),B.endShape(),c.setAttribute("Type",B.getShapeType()),c):x(a,b,n,c,A)}return null}function w(a,b){var d=mxUtils.createXmlDocument(),
+c.view.getState(h,!0);if(null==w||null==w.absolutePoints||null==w.cellBounds)return null;c=l(x,D.XMLNS,"Shape");var z=g(h.id);c.setAttribute("ID",z);c.setAttribute("NameU","Dynamic connector."+z);c.setAttribute("Name","Dynamic connector."+z);c.setAttribute("Type","Shape");c.setAttribute("Master","4");var p=B.state,z=w.absolutePoints,I=w.cellBounds,G=I.width/2,F=I.height/2;c.appendChild(f("PinX",I.x+G,x));c.appendChild(f("PinY",E-I.y-F,x));c.appendChild(f("Width",I.width,x));c.appendChild(f("Height",
+I.height,x));c.appendChild(f("LocPinX",G,x));c.appendChild(f("LocPinY",F,x));B.newEdge(c,w,x);G=function(a,b){var d=a.x,h=a.y,d=d*p.scale-I.x+p.dx+(m?0:B.shiftX),h=(b?0:I.height)-h*p.scale+I.y-p.dy-(m?0:B.shiftY);return{x:d,y:h}};F=G(z[0],!0);c.appendChild(f("BeginX",I.x+F.x,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));c.appendChild(f("BeginY",E-I.y+F.y,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));F=G(z[z.length-1],!0);c.appendChild(f("EndX",I.x+F.x,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));
+c.appendChild(f("EndY",E-I.y+F.y,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));c.appendChild(b("BegTrigger","2",x,h.source?"_XFTRIGGER(Sheet."+g(h.source.id)+"!EventXFMod)":null));c.appendChild(b("EndTrigger","2",x,h.target?"_XFTRIGGER(Sheet."+g(h.target.id)+"!EventXFMod)":null));c.appendChild(b("ConFixedCode","6",x));c.appendChild(b("LayerMember","0",x));d(w,c,x);E=w.style[mxConstants.STYLE_STARTSIZE];h=n(w.style[mxConstants.STYLE_STARTARROW],w.style[mxConstants.STYLE_STARTFILL]);c.appendChild(b("BeginArrow",
+h,x));c.appendChild(b("BeginArrowSize",A(E),x));E=w.style[mxConstants.STYLE_ENDSIZE];h=n(w.style[mxConstants.STYLE_ENDARROW],w.style[mxConstants.STYLE_ENDFILL]);c.appendChild(b("EndArrow",h,x));c.appendChild(b("EndArrowSize",A(E),x));null!=w.text&&w.text.checkBounds()&&(B.save(),w.text.paint(B),B.restore());w=l(x,D.XMLNS,"Section");w.setAttribute("N","Geometry");w.setAttribute("IX","0");for(h=0;h<z.length;h++)E=G(z[h]),w.appendChild(a(0==h?"MoveTo":"LineTo",h+1,E.x,E.y,x));w.appendChild(b("NoFill",
+"1",x));w.appendChild(b("NoLine","0",x));c.appendChild(w);return c}function E(a,b,n,c,f,A){var m=a.geometry;if(null!=m){m.relative&&f&&(m=m.clone(),m.x*=f.width,m.y*=f.height,m.relative=0);f=g(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){c=h(f+"10000",m,n,c,A);c.setAttribute("Type","Group");A=l(n,D.XMLNS,"Shapes");B.save();B.translate(-m.x,-m.y);f=m.clone();f.x=0;f.y=0;a.setGeometry(f);a.treatAsSingle=!0;f=E(a,b,n,m.height,m,!0);a.treatAsSingle=!1;a.setGeometry(m);null!=f&&A.appendChild(f);for(var w=
+0;w<a.getChildCount();w++)f=E(a.children[w],b,n,m.height,m,!0),null!=f&&A.appendChild(f);c.appendChild(A);B.restore();return c}return a.vertex?(c=h(f,m,n,c,A),a=b.view.getState(a,!0),d(a,c,n),B.newShape(c,a,n),null!=a.text&&a.text.checkBounds()&&(B.save(),a.text.paint(B),B.restore()),null!=a.shape&&a.shape.checkBounds()&&(B.save(),a.shape.paint(B),B.restore()),c.appendChild(B.getShapeGeo()),B.endShape(),c.setAttribute("Type",B.getShapeType()),c):x(a,b,n,c,A)}return null}function w(a,b){var d=mxUtils.createXmlDocument(),
h=l(d,D.XMLNS,"PageContents");h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",D.XMLNS);h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",D.XMLNS_R);var n=l(d,D.XMLNS,"Shapes");h.appendChild(n);var c=a.model,f=a.view.translate,A=a.view.scale,x=a.getGraphBounds();B.shiftX=0;B.shiftY=0;if(x.x/A<f.x||x.y/A<f.y)B.shiftX=Math.ceil((f.x-x.x/A)/a.pageFormat.width)*a.pageFormat.width,B.shiftY=Math.ceil((f.y-x.y/A)/a.pageFormat.height)*a.pageFormat.height;B.save();B.translate(-f.x,-f.y);B.scale(1/
A);B.newPage();var A=a.getDefaultParent(),m;for(m in c.cells)f=c.cells[m],f.parent==A&&(f=E(f,a,d,b.pageHeight),null!=f&&n.appendChild(f));n=l(d,D.XMLNS,"Connects");h.appendChild(n);for(m in c.cells)f=c.cells[m],f.edge&&(f.source&&(A=l(d,D.XMLNS,"Connect"),A.setAttribute("FromSheet",g(f.id)),A.setAttribute("FromCell","BeginX"),A.setAttribute("ToSheet",g(f.source.id)),n.appendChild(A)),f.target&&(A=l(d,D.XMLNS,"Connect"),A.setAttribute("FromSheet",g(f.id)),A.setAttribute("FromCell","EndX"),A.setAttribute("ToSheet",
g(f.target.id)),n.appendChild(A)));d.appendChild(h);B.restore();return d}function z(a,b,d,h){a.file(b,(h?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(d))}function I(a,d,h){var n=mxUtils.createXmlDocument(),c=mxUtils.createXmlDocument(),A=l(n,D.XMLNS,"Pages");A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",D.XMLNS);A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",D.XMLNS_R);var x=l(c,D.RELS_XMLNS,"Relationships"),E=1,m;for(m in d){var w="page"+E+".xml",
@@ -508,7 +508,7 @@ g=l(n,D.XMLNS,"Page");g.setAttribute("ID",E-1);g.setAttribute("NameU",m);g.setAt
D.PAGES_TYPE);g.setAttribute("Target",w);x.appendChild(g);z(a,D.VISIO_PAGES+w,d[m]);E++}n.appendChild(A);c.appendChild(x);z(a,D.VISIO_PAGES+"pages.xml",n);z(a,D.VISIO_PAGES+"_rels/pages.xml.rels",c)}function G(a,b){var d=D.VISIO_PAGES_RELS+"page"+b+".xml.rels",h=mxUtils.createXmlDocument(),n=l(h,D.RELS_XMLNS,"Relationships"),c=l(h,D.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml");
n.appendChild(c);var f=B.images;if(0<f.length)for(var A=0;A<f.length;A++)c=l(h,D.RELS_XMLNS,"Relationship"),c.setAttribute("Type",D.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(A+2)),c.setAttribute("Target","../media/"+f[A]),n.appendChild(c);h.appendChild(n);z(a,d,h)}var D=this,B=new mxVsdxCanvas2D,F={},C=1;this.exportCurrentDiagrams=function(){try{if(c.spinner.spin(document.body,mxResources.get("exporting"))){var a=new JSZip;B.init(a);F={};C=1;var b={},d={},h=null!=c.pages?c.pages.length:1;if(null!=
c.pages){for(var n=c.editor.graph.getSelectionCells(),f=c.currentPage,A=0;A<c.pages.length;A++){var x=c.pages[A];c.currentPage!=x&&c.selectPage(x,!0);var E=x.getName(),g=c.editor.graph,l=m(g);b[E]=w(g,l);G(a,A+1);d[E]=l}f!=c.currentPage&&c.selectPage(f,!0);c.editor.graph.setSelectionCells(n)}else g=c.editor.graph,l=m(g),E="Page1",b[E]=w(g,l),G(a,1),d[E]=l;p(a,h);I(a,b,d);b=function(){a.generateAsync({type:"base64"}).then(function(a){c.spinner.stop();var b=c.getBaseFilename();c.saveData(b+".vsdx",
-"vsdx",a,"application/vnd.visio2013",!0)})};0<B.filesLoading?B.onFilesLoaded=b:b()}return!0}catch(fb){return console.log(fb),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";
+"vsdx",a,"application/vnd.visio2013",!0)})};0<B.filesLoading?B.onFilesLoaded=b:b()}return!0}catch(fb){return console.log(fb),c.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";
VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/";
VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(c){this.filesLoading=0;this.zip=c};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(c){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,c):this.xmlDoc.createElement(c)};
mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var c=this.createElt("Section");c.setAttribute("N","Geometry");c.setAttribute("IX",this.geoIndex++);this.geoSec=c;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(c,p,l){this.geoIndex=0;this.shape=c;this.cellState=p;this.xmGeo=p.cell.geometry;this.xmlDoc=l;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};
diff --git a/src/main/webapp/js/mxgraph/Shapes.js b/src/main/webapp/js/mxgraph/Shapes.js
index 4833a7ef..40a56b86 100644
--- a/src/main/webapp/js/mxgraph/Shapes.js
+++ b/src/main/webapp/js/mxgraph/Shapes.js
@@ -3825,8 +3825,54 @@
// Defines connection points for all shapes
IsoRectangleShape.prototype.constraints = [];
- IsoCubeShape.prototype.constraints = [];
- CalloutShape.prototype.constraints = [];
+
+ IsoCubeShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var tan30 = Math.tan(mxUtils.toRadians(30));
+ var tan30Dx = (0.5 - tan30) / 2;
+ var m = Math.min(w, h / (0.5 + tan30));
+ var dx = (w - m) / 2;
+ var dy = (h - m) / 2;
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, dy + 0.25 * m));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + 0.5 * m, dy + m * tan30Dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + m, dy + 0.25 * m));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + m, dy + 0.75 * m));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + 0.5 * m, dy + (1 - tan30Dx) * m));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, dy + 0.75 * m));
+
+ return (constr);
+ };
+
+ CalloutShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;
+ var s = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));
+ var dx = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'position', this.position))));
+ var dx2 = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'position2', this.position2))));
+ var base = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'base', this.base))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - s) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h - s));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - s));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - s) * 0.5));
+
+ if (w >= s * 2)
+ {
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ }
+
+ return (constr);
+ };
+
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),
@@ -3847,9 +3893,76 @@
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;
+
+ NoteShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var s = Math.max(0, Math.min(w, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size)))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - s) * 0.5, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - s, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - s * 0.5, s * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, s));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h + s) * 0.5 ));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
+
+ if (w >= s * 2)
+ {
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ }
+
+ return (constr);
+ };
+
+ CardShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var s = Math.max(0, Math.min(w, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size)))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + s) * 0.5, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s * 0.5, s * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, s));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h + s) * 0.5 ));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+
+ if (w >= s * 2)
+ {
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ }
+
+ return (constr);
+ };
+
+ CubeShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var s = Math.max(0, Math.min(w, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'size', this.size)))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - s) * 0.5, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - s, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - s * 0.5, s * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, s));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h + s) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + s) * 0.5, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s * 0.5, h - s * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - s));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - s) * 0.5));
+
+ return (constr);
+ };
+
FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints;
InternalStorageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
DataStorageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
@@ -3859,7 +3972,25 @@
LineEllipseShape.prototype.constraints = mxEllipse.prototype.constraints;
ManualInputShape.prototype.constraints = mxRectangleShape.prototype.constraints;
DelayShape.prototype.constraints = mxRectangleShape.prototype.constraints;
- DisplayShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+
+ DisplayShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var dx = Math.min(w, h / 2);
+ var s = Math.min(w - dx, Math.max(0, parseFloat(mxUtils.getValue(this.style, 'size', this.size))) * w);
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (s + w - dx) * 0.5, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false, null));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (s + w - dx) * 0.5, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, s, h));
+
+ return (constr);
+ };
+
LoopLimitShape.prototype.constraints = mxRectangleShape.prototype.constraints;
OffPageConnectorShape.prototype.constraints = mxRectangleShape.prototype.constraints;
mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),
@@ -3981,8 +4112,56 @@
new mxConnectionConstraint(new mxPoint(1, 0.5), true),
new mxConnectionConstraint(new mxPoint(1, 0.75), true)];
mxArrow.prototype.constraints = null;
- TeeShape.prototype.constraints = null;
- CornerShape.prototype.constraints = null;
+
+ TeeShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var w2 = Math.abs(w - dx) / 2;
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.75 + dx * 0.25, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx) * 0.5, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx) * 0.5, (h + dy) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx) * 0.5, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, (h + dy) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.25 - dx * 0.25, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy * 0.5));
+
+ return (constr);
+ };
+
+ CornerShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx) * 0.5, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, (h + dy) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx * 0.5, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));
+
+ return (constr);
+ };
+
CrossbarShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), false),
new mxConnectionConstraint(new mxPoint(0, 0.5), false),
new mxConnectionConstraint(new mxPoint(0, 1), false),
@@ -3993,14 +4172,84 @@
new mxConnectionConstraint(new mxPoint(1, 0.5), false),
new mxConnectionConstraint(new mxPoint(1, 1), false)];
- SingleArrowShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
- new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
- DoubleArrowShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
- new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
- CrossShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
- new mxConnectionConstraint(new mxPoint(1, 0.5), false),
- new mxConnectionConstraint(new mxPoint(0.5, 0), false),
- new mxConnectionConstraint(new mxPoint(0.5, 1), false)];
+ SingleArrowShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var aw = h * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowWidth', this.arrowWidth))));
+ var as = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowSize', this.arrowSize))));
+ var at = (h - aw) / 2;
+ var ab = at + aw;
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, at));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - as) * 0.5, at));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - as, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - as, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - as) * 0.5, h - at));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - at));
+
+ return (constr);
+ };
+
+ DoubleArrowShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var aw = h * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowWidth', SingleArrowShape.prototype.arrowWidth))));
+ var as = w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'arrowSize', SingleArrowShape.prototype.arrowSize))));
+ var at = (h - aw) / 2;
+ var ab = at + aw;
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, as, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5, at));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - as, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - as, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5, h - at));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, as, h));
+
+ return (constr);
+ };
+
+ CrossShape.prototype.getConstraints = function(style, w, h)
+ {
+ var constr = [];
+ var m = Math.min(h, w);
+ var size = Math.max(0, Math.min(m, m * parseFloat(mxUtils.getValue(this.style, 'size', this.size))));
+ var t = (h - size) / 2;
+ var b = t + size;
+ var l = (w - size) / 2;
+ var r = l + size;
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, t * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, t * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, t));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, h - t * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, h - t * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, r, b));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + r) * 0.5, t));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, t));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, b));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + r) * 0.5, b));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, b));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l * 0.5, t));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, t));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, b));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l * 0.5, b));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, l, t));
+
+ return (constr);
+ };
+
UmlLifeline.prototype.constraints = null;
OrShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), false),
new mxConnectionConstraint(new mxPoint(0, 0.5), false),
diff --git a/src/main/webapp/js/reader.min.js b/src/main/webapp/js/reader.min.js
index 5ad08e98..7ebc18a8 100644
--- a/src/main/webapp/js/reader.min.js
+++ b/src/main/webapp/js/reader.min.js
@@ -72,20 +72,20 @@ li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement
s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};p.ELEMENT_DOM_INTERFACES=p.Q;p.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};p.ueffects=p.P;p.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
p.URIEFFECTS=p.J;p.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};p.ltypes=p.M;p.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};p.LOADERTYPES=p.I;"undefined"!==typeof window&&(window.html4=p);a=function(a){function b(a,b){var c;if(ca.hasOwnProperty(b))c=ca[b];else{var d=b.match(W);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(v))?String.fromCharCode(parseInt(d[1],
-16)):J&&P.test(b)?(J.innerHTML="&"+b+";",d=J.textContent,ca[b]=d):"&"+b+";"}return c}function c(a){return a.replace(da,b)}function d(a){return(""+a).replace(I,"&amp;").replace(aa,"&lt;").replace(ea,"&gt;").replace(U,"&#34;")}function e(a){return a.replace(M,"&amp;$1").replace(aa,"&lt;").replace(ea,"&gt;")}function g(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
-d=a+"";if(S)d=d.split(e);else{for(var f=[],g=0,h;null!==(h=e.exec(d));)f.push(d.substring(g,h.index)),f.push(h[0]),g=h.index+h[0].length;f.push(d.substring(g));d=f}k(b,d,0,{r:!1,C:!1},c)}}function h(a,b,c,d,e){return function(){k(a,b,c,d,e)}}function k(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var g,k,n,v=c.length;d<v;){var p=c[d++],C=c[d];switch(p){case "&":N.test(C)?(b.e&&b.e("&"+C,f,O,h(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,O,h(b,c,d,e,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(C))if(g[0].length===
+16)):J&&P.test(b)?(J.innerHTML="&"+b+";",d=J.textContent,ca[b]=d):"&"+b+";"}return c}function c(a){return a.replace(da,b)}function d(a){return(""+a).replace(I,"&amp;").replace(aa,"&lt;").replace(ea,"&gt;").replace(S,"&#34;")}function e(a){return a.replace(M,"&amp;$1").replace(aa,"&lt;").replace(ea,"&gt;")}function g(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
+d=a+"";if(T)d=d.split(e);else{for(var f=[],g=0,h;null!==(h=e.exec(d));)f.push(d.substring(g,h.index)),f.push(h[0]),g=h.index+h[0].length;f.push(d.substring(g));d=f}k(b,d,0,{r:!1,C:!1},c)}}function h(a,b,c,d,e){return function(){k(a,b,c,d,e)}}function k(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var g,k,n,v=c.length;d<v;){var p=c[d++],C=c[d];switch(p){case "&":N.test(C)?(b.e&&b.e("&"+C,f,O,h(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,O,h(b,c,d,e,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(C))if(g[0].length===
C.length&&">"===c[d+1])d+=2,n=g[1].toLowerCase(),b.t&&b.t(n,f,O,h(b,c,d,e,f));else{var R=c,Z=d,q=b,r=f,X=O,J=e,P=m(R,Z);P?(q.t&&q.t(P.name,r,X,h(q,R,Z,J,r)),d=P.next):d=R.length}else b.e&&b.e("&lt;/",f,O,h(b,c,d,e,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(C))if(g[0].length===C.length&&">"===c[d+1]){d+=2;n=g[1].toLowerCase();b.w&&b.w(n,[],f,O,h(b,c,d,e,f));var t=a.f[n];t&Y&&(d=l(c,{name:n,next:d,c:t},b,f,O,e))}else{var R=c,Z=b,q=f,r=O,X=e,B=m(R,d);B?(Z.w&&Z.w(B.name,B.R,q,r,h(Z,R,B.next,X,q)),
d=B.c&Y?l(R,B,Z,q,r,X):B.next):d=R.length}else b.e&&b.e("&lt;",f,O,h(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(k=d+1;k<v&&(">"!==c[k]||!/--$/.test(c[k-1]));k++);if(k<v){if(b.A){var G=c.slice(d,k).join("");b.A(G.substr(0,G.length-2),f,O,h(b,c,k+1,e,f))}d=k+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,O,h(b,c,d,e,f));break;case "<!":if(/^\w/.test(C)){if(!e.r){for(k=d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f));break;case "<?":if(!e.r){for(k=
-d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,O,h(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,O,h(b,c,d,e,f));break;case "":break;default:b.e&&b.e(p,f,O,h(b,c,d,e,f))}}b.B&&b.B(f)}catch(ga){if(ga!==O)throw ga;}}function l(b,c,d,f,g,k){var l=b.length;R.hasOwnProperty(c.name)||(R[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var m=R[c.name],n=c.next,v=c.next+1;v<l&&("</"!==b[v-1]||!m.test(b[v]));v++);v<l&&--v;l=b.slice(n,v).join("");if(c.c&a.c.CDATA)d.z&&d.z(l,f,g,h(d,b,
+d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,O,h(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,O,h(b,c,d,e,f));break;case "":break;default:b.e&&b.e(p,f,O,h(b,c,d,e,f))}}b.B&&b.B(f)}catch(ha){if(ha!==O)throw ha;}}function l(b,c,d,f,g,k){var l=b.length;R.hasOwnProperty(c.name)||(R[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var m=R[c.name],n=c.next,v=c.next+1;v<l&&("</"!==b[v-1]||!m.test(b[v]));v++);v<l&&--v;l=b.slice(n,v).join("");if(c.c&a.c.CDATA)d.z&&d.z(l,f,g,h(d,b,
v,k,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(l),f,g,h(d,b,v,k,f));else throw Error("bug");return v}function m(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var g=b[d].substr(e[0].length),h=d+1,k=b.length;h<k&&">"!==b[h];h++)g+=b[h];if(!(k<=h)){for(var l=[];""!==g;)if(e=Q.exec(g))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],m=!1,g=[g,b[h++]];h<k;h++){if(m){if(">"===b[h])break}else 0<=b[h].indexOf(e)&&(m=!0);g.push(b[h])}if(k<=h)break;g=g.join("")}else{var m=
e[1].toLowerCase(),n;if(e[2]){n=e[3];var v=n.charCodeAt(0);if(34===v||39===v)n=n.substr(1,n.length-2);n=c(n.replace(G,""))}else n="";l.push(m,n);g=g.substr(e[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=l;f.next=h+1;return f}}function n(b){function c(a,b){f||b.push(a)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(c,g,h){if(!f&&a.f.hasOwnProperty(c)){var k=a.f[c];if(!(k&a.c.FOLDABLE)){var l=b(c,g);if(l){if("object"!==typeof l)throw Error("tagPolicy did not return object (old API?)");
if("attribs"in l)g=l.attribs;else throw Error("tagPolicy gave no attribs");var m;"tagName"in l?(m=l.tagName,l=a.f[m]):(m=c,l=k);if(k&a.c.OPTIONAL_ENDTAG){var n=e[e.length-1];n&&n.D===c&&(n.v!==m||c!==m)&&h.push("</",n.v,">")}k&a.c.EMPTY||e.push({D:c,v:m});h.push("<",m);c=0;for(n=g.length;c<n;c+=2){var v=g[c],p=g[c+1];null!==p&&void 0!==p&&h.push(" ",v,'="',d(p),'"')}h.push(">");k&a.c.EMPTY&&!(l&a.c.EMPTY)&&h.push("</",m,">")}else f=!(k&a.c.EMPTY)}}},endTag:function(b,c){if(f)f=!1;else if(a.f.hasOwnProperty(b)){var d=
a.f[b];if(!(d&(a.c.EMPTY|a.c.FOLDABLE))){if(d&a.c.OPTIONAL_ENDTAG)for(d=e.length;0<=--d;){var g=e[d].D;if(g===b)break;if(!(a.f[g]&a.c.OPTIONAL_ENDTAG))return}else for(d=e.length;0<=--d&&e[d].D!==b;);if(!(0>d)){for(g=e.length;--g>d;){var h=e[g].v;a.f[h]&a.c.OPTIONAL_ENDTAG||c.push("</",h,">")}d<e.length&&(b=e[d].v);e.length=d;c.push("</",b,">")}}}},pcdata:c,rcdata:c,cdata:c,endDoc:function(a){for(;e.length;e.length--)a.push("</",e[e.length-1].v,">")}})}function p(a,b,c,d,e){if(!e)return null;try{var g=
-f.parse(""+a);if(g&&(!g.K()||fa.test(g.W()))){var h=e(g,b,c,d);return h?h.toString():null}}catch(na){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function C(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function L(b,c,d,e,f){for(var g=0;g<c.length;g+=2){var h=c[g],k=c[g+1],l=k,m=null,n;if((n=
-b+"::"+h,a.m.hasOwnProperty(n))||(n="*::"+h,a.m.hasOwnProperty(n)))m=a.m[n];if(null!==m)switch(m){case a.d.NONE:break;case a.d.SCRIPT:k=null;f&&r(f,b,h,l,k);break;case a.d.STYLE:if("undefined"===typeof V){k=null;f&&r(f,b,h,l,k);break}var v=[];V(k,{declaration:function(b,c){var e=b.toLowerCase();T(e,c,d?function(b){return p(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&v.push(e+": "+c.join(" "))}});k=0<v.length?v.join(" ; "):null;f&&r(f,b,h,l,k);break;case a.d.ID:case a.d.IDREF:case a.d.IDREFS:case a.d.GLOBAL_NAME:case a.d.LOCAL_NAME:case a.d.CLASSES:k=
+f.parse(""+a);if(g&&(!g.K()||fa.test(g.W()))){var h=e(g,b,c,d);return h?h.toString():null}}catch(pa){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function C(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function L(b,c,d,e,f){for(var g=0;g<c.length;g+=2){var h=c[g],k=c[g+1],l=k,m=null,n;if((n=
+b+"::"+h,a.m.hasOwnProperty(n))||(n="*::"+h,a.m.hasOwnProperty(n)))m=a.m[n];if(null!==m)switch(m){case a.d.NONE:break;case a.d.SCRIPT:k=null;f&&r(f,b,h,l,k);break;case a.d.STYLE:if("undefined"===typeof V){k=null;f&&r(f,b,h,l,k);break}var v=[];V(k,{declaration:function(b,c){var e=b.toLowerCase();U(e,c,d?function(b){return p(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&v.push(e+": "+c.join(" "))}});k=0<v.length?v.join(" ; "):null;f&&r(f,b,h,l,k);break;case a.d.ID:case a.d.IDREF:case a.d.IDREFS:case a.d.GLOBAL_NAME:case a.d.LOCAL_NAME:case a.d.CLASSES:k=
e?e(k):k;f&&r(f,b,h,l,k);break;case a.d.URI:k=p(k,C(a.J,b,h),C(a.I,b,h),{TYPE:"MARKUP",XML_ATTR:h,XML_TAG:b},d);f&&r(f,b,h,l,k);break;case a.d.URI_FRAGMENT:k&&"#"===k.charAt(0)?(k=k.substring(1),k=e?e(k):k,null!==k&&void 0!==k&&(k="#"+k)):k=null;f&&r(f,b,h,l,k);break;default:k=null,f&&r(f,b,h,l,k)}else k=null,f&&r(f,b,h,l,k);c[g+1]=k}return c}function K(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:L(e,f,b,c,d)}}}function H(a,b){var c=[];n(b)(a,
-c);return c.join("")}var V,T;"undefined"!==typeof window&&(V=window.parseCssDeclarations,T=window.sanitizeCssProperty);var ca={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},W=/^#(\d+)$/,v=/^#x([0-9A-Fa-f]+)$/,P=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,G=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,N=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,I=/&/g,M=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,aa=
-/[<]/g,ea=/>/g,U=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,S=3==="a,b".split(/(,)/).length,Y=a.c.CDATA|a.c.RCDATA,O={},R={},fa=/^(?:https?|mailto|data)$/i,X={};X.pa=X.escapeAttrib=d;X.ra=X.makeHtmlSanitizer=n;X.sa=X.makeSaxParser=g;X.ta=X.makeTagPolicy=K;X.wa=X.normalizeRCData=e;X.xa=X.sanitize=function(a,b,c,d){return H(a,K(b,c,d))};X.ya=X.sanitizeAttribs=L;X.za=X.sanitizeWithPolicy=H;X.Ba=X.unescapeEntities=c;return X}(p);c=a.sanitize;"undefined"!==
+c);return c.join("")}var V,U;"undefined"!==typeof window&&(V=window.parseCssDeclarations,U=window.sanitizeCssProperty);var ca={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},W=/^#(\d+)$/,v=/^#x([0-9A-Fa-f]+)$/,P=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,G=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,N=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,I=/&/g,M=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,aa=
+/[<]/g,ea=/>/g,S=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,T=3==="a,b".split(/(,)/).length,Y=a.c.CDATA|a.c.RCDATA,O={},R={},fa=/^(?:https?|mailto|data)$/i,X={};X.pa=X.escapeAttrib=d;X.ra=X.makeHtmlSanitizer=n;X.sa=X.makeSaxParser=g;X.ta=X.makeTagPolicy=K;X.wa=X.normalizeRCData=e;X.xa=X.sanitize=function(a,b,c,d){return H(a,K(b,c,d))};X.ya=X.sanitizeAttribs=L;X.za=X.sanitizeWithPolicy=H;X.Ba=X.unescapeEntities=c;return X}(p);c=a.sanitize;"undefined"!==
typeof window&&(window.html=a,window.html_sanitize=c)})();var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,h,k,l=0;for(null!=b&&b||(a=Base64._utf8_encode(a));l<a.length;)d=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=d>>2,d=(d&3)<<4|e>>4,h=(e&15)<<2|f>>6,k=f&63,isNaN(e)?h=k=64:isNaN(f)&&(k=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(h)+this._keyStr.charAt(k);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,h,k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");k<a.length;)d=this._keyStr.indexOf(a.charAt(k++)),e=this._keyStr.indexOf(a.charAt(k++)),g=this._keyStr.indexOf(a.charAt(k++)),h=this._keyStr.indexOf(a.charAt(k++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|h,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=h&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function b(c,d,e){function f(h,l){if(!d[h]){if(!c[h]){var k="function"==typeof require&&require;if(!l&&k)return k(h,!0);if(g)return g(h,!0);k=Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k;}k=d[h]={exports:{}};
@@ -112,27 +112,27 @@ function h(b,c){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart
b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=g?e-g:0;while(--d);c=d=g;do e=b.prev[--c],b.prev[c]=e>=g?e-g:0;while(--d);f+=g}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var h=b.strstart+b.lookahead,k=c.avail_in;if(d=(k>f&&(k=f),0===k?0:(c.avail_in-=k,u.arraySet(e,c.input,c.next_in,k,h),1===c.state.wrap?c.adler=F(c.adler,e,k,h):2===c.state.wrap&&(c.adler=E(c.adler,e,k,h)),c.next_in+=k,c.total_in+=k,k)),b.lookahead+=d,b.lookahead+
b.insert>=I)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+I-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<I)););}while(b.lookahead<aa&&0!==b.strm.avail_in)}function p(b,c){for(var d,e;;){if(b.lookahead<aa){if(n(b),b.lookahead<aa&&c===A)return Q;if(0===b.lookahead)break}if(d=0,b.lookahead>=I&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-aa&&(b.match_length=m(b,d)),b.match_length>=I)if(e=D._tr_tally(b,b.strstart-b.match_start,b.match_length-I),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=I){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);
-b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(h(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<I-1?b.strstart:I-1,c===C?(h(b,!0),0===b.strm.avail_out?Y:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?Q:S}function r(b,c){for(var d,e,f;;){if(b.lookahead<aa){if(n(b),b.lookahead<aa&&c===A)return Q;
+b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(h(b,!1),0===b.strm.avail_out))return Q}return b.insert=b.strstart<I-1?b.strstart:I-1,c===C?(h(b,!0),0===b.strm.avail_out?Y:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?Q:T}function r(b,c){for(var d,e,f;;){if(b.lookahead<aa){if(n(b),b.lookahead<aa&&c===A)return Q;
if(0===b.lookahead)break}if(d=0,b.lookahead>=I&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=I-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-aa&&(b.match_length=m(b,d),5>=b.match_length&&(b.strategy===V||b.match_length===I&&4096<b.strstart-b.match_start)&&(b.match_length=I-1)),b.prev_length>=I&&b.match_length<=b.prev_length){f=
b.strstart+b.lookahead-I;e=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-I);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=I-1,b.strstart++,e&&(h(b,!1),0===b.strm.avail_out))return Q}else if(b.match_available){if(e=D._tr_tally(b,0,b.window[b.strstart-1]),e&&h(b,!1),
-b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<I-1?b.strstart:I-1,c===C?(h(b,!0),0===b.strm.avail_out?Y:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?Q:S}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
+b.strstart++,b.lookahead--,0===b.strm.avail_out)return Q}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<I-1?b.strstart:I-1,c===C?(h(b,!0),0===b.strm.avail_out?Y:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?Q:T}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=W;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=
this.ins_h=0;this.dyn_ltree=new u.Buf16(2*da);this.dyn_dtree=new u.Buf16(2*(2*J+1));this.bl_tree=new u.Buf16(2*(2*G+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new u.Buf16(N+1);this.heap=new u.Buf16(2*P+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new u.Buf16(2*P+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function z(b){var c;
-return b&&b.state?(b.total_in=b.total_out=0,b.data_type=ca,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ea:U,b.adler=2===c.wrap?0:1,c.last_flush=A,D._tr_init(c),L):e(b,K)}function w(b){var c=z(b);c===L&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
-b.prev_length=I-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,g,h){if(!b)return K;var k=1;if(c===H&&(c=6),0>f?(k=0,f=-f):15<f&&(k=2,f-=16),1>g||g>v||d!==W||8>f||15<f||0>c||9<c||0>h||h>T)return e(b,K);8===f&&(f=9);var l=new t;return b.state=l,l.strm=b,l.wrap=k,l.gzhead=null,l.w_bits=f,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=g+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+I-1)/I),l.window=new u.Buf8(2*l.w_size),l.head=new u.Buf16(l.hash_size),
-l.prev=new u.Buf16(l.w_size),l.lit_bufsize=1<<g+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new u.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=c,l.strategy=h,l.method=d,w(b)}var y,u=b("../utils/common"),D=b("./trees"),F=b("./adler32"),E=b("./crc32"),B=b("./messages"),A=0,C=4,L=0,K=-2,H=-1,V=1,T=4,ca=2,W=8,v=9,P=286,J=30,G=19,da=2*P+1,N=15,I=3,M=258,aa=M+I+1,ea=42,U=113,Q=1,S=2,Y=3,O=4;y=[new q(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
+return b&&b.state?(b.total_in=b.total_out=0,b.data_type=ca,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ea:S,b.adler=2===c.wrap?0:1,c.last_flush=A,D._tr_init(c),L):e(b,K)}function w(b){var c=z(b);c===L&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
+b.prev_length=I-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,g,h){if(!b)return K;var k=1;if(c===H&&(c=6),0>f?(k=0,f=-f):15<f&&(k=2,f-=16),1>g||g>v||d!==W||8>f||15<f||0>c||9<c||0>h||h>U)return e(b,K);8===f&&(f=9);var l=new t;return b.state=l,l.strm=b,l.wrap=k,l.gzhead=null,l.w_bits=f,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=g+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+I-1)/I),l.window=new u.Buf8(2*l.w_size),l.head=new u.Buf16(l.hash_size),
+l.prev=new u.Buf16(l.w_size),l.lit_bufsize=1<<g+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new u.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=c,l.strategy=h,l.method=d,w(b)}var y,u=b("../utils/common"),D=b("./trees"),F=b("./adler32"),E=b("./crc32"),B=b("./messages"),A=0,C=4,L=0,K=-2,H=-1,V=1,U=4,ca=2,W=8,v=9,P=286,J=30,G=19,da=2*P+1,N=15,I=3,M=258,aa=M+I+1,ea=42,S=113,Q=1,T=2,Y=3,O=4;y=[new q(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(n(b),0===b.lookahead&&c===A)return Q;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,h(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-aa&&(h(b,!1),0===b.strm.avail_out))return Q}return b.insert=0,c===C?(h(b,!0),0===b.strm.avail_out?Y:O):(b.strstart>b.block_start&&h(b,!1),Q)}),new q(4,4,8,4,p),new q(4,5,16,8,p),new q(4,6,
32,32,p),new q(4,4,16,16,r),new q(8,16,32,32,r),new q(8,16,128,128,r),new q(8,32,128,256,r),new q(32,128,258,1024,r),new q(32,258,258,4096,r)];d.deflateInit=function(b,c){return x(b,c,W,15,8,0)};d.deflateInit2=x;d.deflateReset=w;d.deflateResetKeep=z;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?K:(b.state.gzhead=c,L):K};d.deflate=function(b,c){var d,m,v,p;if(!b||!b.state||5<c||0>c)return b?e(b,K):K;if(m=b.state,!b.output||!b.input&&0!==b.avail_in||666===m.status&&c!==C)return e(b,
0===b.avail_out?-5:K);if(m.strm=b,d=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(b.adler=0,k(m,31),k(m,139),k(m,8),m.gzhead?(k(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),k(m,255&m.gzhead.time),k(m,m.gzhead.time>>8&255),k(m,m.gzhead.time>>16&255),k(m,m.gzhead.time>>24&255),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(k(m,255&m.gzhead.extra.length),k(m,m.gzhead.extra.length>>
-8&255)),m.gzhead.hcrc&&(b.adler=E(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(k(m,0),k(m,0),k(m,0),k(m,0),k(m,0),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,3),m.status=U)):(v=W+(m.w_bits-8<<4)<<8,v|=(2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3)<<6,0!==m.strstart&&(v|=32),m.status=U,l(m,v+(31-v%31)),0!==m.strstart&&(l(m,b.adler>>>16),l(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(v=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==
+8&255)),m.gzhead.hcrc&&(b.adler=E(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(k(m,0),k(m,0),k(m,0),k(m,0),k(m,0),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,3),m.status=S)):(v=W+(m.w_bits-8<<4)<<8,v|=(2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3)<<6,0!==m.strstart&&(v|=32),m.status=S,l(m,v+(31-v%31)),0!==m.strstart&&(l(m,b.adler>>>16),l(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(v=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==
m.pending_buf_size||(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending!==m.pending_buf_size));)k(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-
v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=1;break}p=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=
-1;break}p=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(k(m,255&b.adler),k(m,b.adler>>8&255),b.adler=0,m.status=U)):m.status=U),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush=-1,L}else if(0===b.avail_in&&(c<<1)-
+1;break}p=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(k(m,255&b.adler),k(m,b.adler>>8&255),b.adler=0,m.status=S)):m.status=S),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush=-1,L}else if(0===b.avail_in&&(c<<1)-
(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==C)return e(b,-5);if(666===m.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==m.lookahead||c!==A&&666!==m.status){var q;if(2===m.strategy)a:{for(var r;;){if(0===m.lookahead&&(n(m),0===m.lookahead)){if(c===A){q=Q;break a}break}if(m.match_length=0,r=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,r&&(h(m,!1),0===m.strm.avail_out)){q=Q;break a}}q=(m.insert=0,c===C?(h(m,!0),0===m.strm.avail_out?Y:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?
-Q:S)}else if(3===m.strategy)a:{var J,P;for(r=m.window;;){if(m.lookahead<=M){if(n(m),m.lookahead<=M&&c===A){q=Q;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=I&&0<m.strstart&&(P=m.strstart-1,J=r[P],J===r[++P]&&J===r[++P]&&J===r[++P])){for(d=m.strstart+M;J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&P<d;);m.match_length=M-(d-P);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=I?(q=D._tr_tally(m,1,m.match_length-
-I),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(h(m,!1),0===m.strm.avail_out)){q=Q;break a}}q=(m.insert=0,c===C?(h(m,!0),0===m.strm.avail_out?Y:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?Q:S)}else q=y[m.level].func(m,c);if(q!==Y&&q!==O||(m.status=666),q===Q||q===Y)return 0===b.avail_out&&(m.last_flush=-1),L;if(q===S&&(1===c?D._tr_align(m):5!==c&&(D._tr_stored_block(m,0,0,!1),3===c&&(f(m.head),0===
+Q:T)}else if(3===m.strategy)a:{var J,P;for(r=m.window;;){if(m.lookahead<=M){if(n(m),m.lookahead<=M&&c===A){q=Q;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=I&&0<m.strstart&&(P=m.strstart-1,J=r[P],J===r[++P]&&J===r[++P]&&J===r[++P])){for(d=m.strstart+M;J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&J===r[++P]&&P<d;);m.match_length=M-(d-P);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=I?(q=D._tr_tally(m,1,m.match_length-
+I),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(h(m,!1),0===m.strm.avail_out)){q=Q;break a}}q=(m.insert=0,c===C?(h(m,!0),0===m.strm.avail_out?Y:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?Q:T)}else q=y[m.level].func(m,c);if(q!==Y&&q!==O||(m.status=666),q===Q||q===Y)return 0===b.avail_out&&(m.last_flush=-1),L;if(q===T&&(1===c?D._tr_align(m):5!==c&&(D._tr_stored_block(m,0,0,!1),3===c&&(f(m.head),0===
m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(b),0===b.avail_out))return m.last_flush=-1,L}return c!==C?L:0>=m.wrap?1:(2===m.wrap?(k(m,255&b.adler),k(m,b.adler>>8&255),k(m,b.adler>>16&255),k(m,b.adler>>24&255),k(m,255&b.total_in),k(m,b.total_in>>8&255),k(m,b.total_in>>16&255),k(m,b.total_in>>24&255)):(l(m,b.adler>>>16),l(m,65535&b.adler)),g(b),0<m.wrap&&(m.wrap=-m.wrap),0!==m.pending?L:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==ea&&69!==c&&73!==c&&91!==
-c&&103!==c&&c!==U&&666!==c?e(b,K):(b.state=null,c===U?e(b,-3):L)):K};d.deflateSetDictionary=function(b,c){var d,e,g,h,k,m,l;e=c.length;if(!b||!b.state||(d=b.state,h=d.wrap,2===h||1===h&&d.status!==ea||d.lookahead))return K;1===h&&(b.adler=F(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===h&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),k=new u.Buf8(d.w_size),u.arraySet(k,c,e-d.w_size,d.w_size,0),c=k,e=d.w_size);k=b.avail_in;m=b.next_in;l=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(n(d);d.lookahead>=
+c&&103!==c&&c!==S&&666!==c?e(b,K):(b.state=null,c===S?e(b,-3):L)):K};d.deflateSetDictionary=function(b,c){var d,e,g,h,k,m,l;e=c.length;if(!b||!b.state||(d=b.state,h=d.wrap,2===h||1===h&&d.status!==ea||d.lookahead))return K;1===h&&(b.adler=F(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===h&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),k=new u.Buf8(d.w_size),u.arraySet(k,c,e-d.w_size,d.w_size,0),c=k,e=d.w_size);k=b.avail_in;m=b.next_in;l=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(n(d);d.lookahead>=
I;){e=d.strstart;g=d.lookahead-(I-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+I-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--g);d.strstart=e;d.lookahead=I-1;n(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=I-1,d.match_available=0,b.next_in=m,b.input=l,b.avail_in=k,d.wrap=h,L};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,e,f,l,m,n,p,r,q,t,z,w,x,y,u,D,F,E,B,A,C,L,K,H;d=b.state;e=b.next_in;K=b.input;f=e+(b.avail_in-5);l=b.next_out;H=b.output;m=l-(c-b.avail_out);n=l+(b.avail_out-257);p=d.dmax;r=d.wsize;q=d.whave;t=d.wnext;z=d.window;w=d.hold;x=d.bits;y=d.lencode;u=d.distcode;D=(1<<d.lenbits)-
1;F=(1<<d.distbits)-1;a:do b:for(15>x&&(w+=K[e++]<<x,x+=8,w+=K[e++]<<x,x+=8),E=y[w&D];;){if(B=E>>>24,w>>>=B,x-=B,B=E>>>16&255,0===B)H[l++]=65535&E;else{if(!(16&B)){if(0===(64&B)){E=y[(65535&E)+(w&(1<<B)-1)];continue b}if(32&B){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}A=65535&E;(B&=15)&&(x<B&&(w+=K[e++]<<x,x+=8),A+=w&(1<<B)-1,w>>>=B,x-=B);15>x&&(w+=K[e++]<<x,x+=8,w+=K[e++]<<x,x+=8);E=u[w&F];c:for(;;){if(B=E>>>24,w>>>=B,x-=B,B=E>>>16&255,!(16&B)){if(0===(64&B)){E=u[(65535&
@@ -141,8 +141,8 @@ while(--B);E=l-C;L=H}}}else if(E+=t-B,B<A){A-=B;do H[l++]=z[E++];while(--B);E=l-
24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new r.Buf16(320);this.work=new r.Buf16(288);this.distdyn=this.lendyn=null;this.was=
this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=u,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(D),c.distcode=c.distdyn=new r.Buf32(F),c.sane=1,c.back=-1,x):y}function h(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):y}function k(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<
c)?y:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,h(b))):y}function l(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=k(b,c),d!==x&&(b.state=null),d):y}function m(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new r.Buf8(b.wsize)),e>=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d-e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext=
-e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var n,p,r=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),z=b("./inffast"),w=b("./inftrees"),x=0,y=-2,u=1,D=852,F=592,E=!0;d.inflateReset=h;d.inflateReset2=k;d.inflateResetKeep=g;d.inflateInit=function(b){return l(b,15)};d.inflateInit2=l;d.inflate=function(b,c){var d,f,g,h,k,l,B,A,v,P,J,G,da,N,I,M,D,F,U,Q,S,Y,O=0,R=new r.Buf8(4),fa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
-!b.output||!b.input&&0!==b.avail_in)return y;d=b.state;12===d.mode&&(d.mode=13);k=b.next_out;g=b.output;B=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;P=l;J=B;S=x;a:for(;;)switch(d.mode){case u:if(0===d.wrap){d.mode=13;break}for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(2&d.wrap&&35615===A){d.check=0;R[0]=255&A;R[1]=A>>>8&255;d.check=t(d.check,R,2,0);v=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";
+e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var n,p,r=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),z=b("./inffast"),w=b("./inftrees"),x=0,y=-2,u=1,D=852,F=592,E=!0;d.inflateReset=h;d.inflateReset2=k;d.inflateResetKeep=g;d.inflateInit=function(b){return l(b,15)};d.inflateInit2=l;d.inflate=function(b,c){var d,f,g,h,k,l,B,A,v,P,J,G,da,N,I,M,D,F,S,Q,T,Y,O=0,R=new r.Buf8(4),fa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
+!b.output||!b.input&&0!==b.avail_in)return y;d=b.state;12===d.mode&&(d.mode=13);k=b.next_out;g=b.output;B=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;P=l;J=B;T=x;a:for(;;)switch(d.mode){case u:if(0===d.wrap){d.mode=13;break}for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(2&d.wrap&&35615===A){d.check=0;R[0]=255&A;R[1]=A>>>8&255;d.check=t(d.check,R,2,0);v=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";
d.mode=30;break}if(8!==(15&A)){b.msg="unknown compression method";d.mode=30;break}if(A>>>=4,v-=4,Q=(15&A)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<Q;b.adler=d.check=1;d.mode=512&A?10:12;v=A=0;break;case 2:for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(d.flags=A,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";d.mode=30;break}d.head&&(d.head.text=A>>8&1);512&d.flags&&
(R[0]=255&A,R[1]=A>>>8&255,d.check=t(d.check,R,2,0));v=A=0;d.mode=3;case 3:for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.head&&(d.head.time=A);512&d.flags&&(R[0]=255&A,R[1]=A>>>8&255,R[2]=A>>>16&255,R[3]=A>>>24&255,d.check=t(d.check,R,4,0));v=A=0;d.mode=4;case 4:for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.head&&(d.head.xflags=255&A,d.head.os=A>>8);512&d.flags&&(R[0]=255&A,R[1]=A>>>8&255,d.check=t(d.check,R,2,0));v=A=0;d.mode=5;case 5:if(1024&d.flags){for(;16>v;){if(0===l)break a;l--;
A+=f[h++]<<v;v+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(R[0]=255&A,R[1]=A>>>8&255,d.check=t(d.check,R,2,0));v=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(G=d.length,G>l&&(G=l),G&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,h,G,Q)),512&d.flags&&(d.check=t(d.check,f,G,h)),l-=G,h+=G,d.length-=G),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===l)break a;G=0;do Q=f[h+
@@ -150,32 +150,32 @@ G++],d.head&&Q&&65536>d.length&&(d.head.name+=String.fromCharCode(Q));while(Q&&G
A+=f[h++]<<v;v+=8}if(A!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}v=A=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}b.adler=d.check=e(A);v=A=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=k,b.avail_out=B,b.next_in=h,b.avail_in=l,d.hold=A,d.bits=v,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){A>>>=7&v;v-=7&v;d.mode=27;break}for(;3>v;){if(0===
l)break a;l--;A+=f[h++]<<v;v+=8}switch(d.last=1&A,A>>>=1,--v,3&A){case 0:d.mode=14;break;case 1:M=d;if(E){n=new r.Buf32(512);p=new r.Buf32(32);for(N=0;144>N;)M.lens[N++]=8;for(;256>N;)M.lens[N++]=9;for(;280>N;)M.lens[N++]=7;for(;288>N;)M.lens[N++]=8;w(1,M.lens,0,288,n,0,M.work,{bits:9});for(N=0;32>N;)M.lens[N++]=5;w(2,M.lens,0,32,p,0,M.work,{bits:5});E=!1}M.lencode=n;M.lenbits=9;M.distcode=p;M.distbits=5;if(d.mode=20,6===c){A>>>=2;v-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
d.mode=30}A>>>=2;v-=2;break;case 14:A>>>=7&v;for(v-=7&v;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if((65535&A)!==(A>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,v=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(G=d.length){if(G>l&&(G=l),G>B&&(G=B),0===G)break a;r.arraySet(g,f,h,G,k);l-=G;h+=G;B-=G;k+=G;d.length-=G;break}d.mode=12;break;case 17:for(;14>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(d.nlen=(31&A)+257,A>>>=5,v-=5,d.ndist=(31&A)+
-1,A>>>=5,v-=5,d.ncode=(15&A)+4,A>>>=4,v-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.lens[fa[d.have++]]=7&A;A>>>=3;v-=3}for(;19>d.have;)d.lens[fa[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Y={bits:d.lenbits},S=w(0,d.lens,0,19,d.lencode,0,d.work,Y),d.lenbits=Y.bits,S){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<
+1,A>>>=5,v-=5,d.ncode=(15&A)+4,A>>>=4,v-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.lens[fa[d.have++]]=7&A;A>>>=3;v-=3}for(;19>d.have;)d.lens[fa[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Y={bits:d.lenbits},T=w(0,d.lens,0,19,d.lencode,0,d.work,Y),d.lenbits=Y.bits,T){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<
d.nlen+d.ndist;){for(;O=d.lencode[A&(1<<d.lenbits)-1],I=O>>>24,M=65535&O,!(I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(16>M)A>>>=I,v-=I,d.lens[d.have++]=M;else{if(16===M){for(N=I+2;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A>>>=I,v-=I,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];G=3+(3&A);A>>>=2;v-=2}else if(17===M){for(N=I+3;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=I;v-=I;Q=0;G=3+(7&A);A>>>=3;v-=3}else{for(N=I+7;v<N;){if(0===l)break a;l--;
-A+=f[h++]<<v;v+=8}A>>>=I;v-=I;Q=0;G=11+(127&A);A>>>=7;v-=7}if(d.have+G>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;G--;)d.lens[d.have++]=Q}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Y={bits:d.lenbits},S=w(1,d.lens,0,d.nlen,d.lencode,0,d.work,Y),d.lenbits=Y.bits,S){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Y={bits:d.distbits},S=w(2,d.lens,d.nlen,d.ndist,
-d.distcode,0,d.work,Y),d.distbits=Y.bits,S){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=l&&258<=B){b.next_out=k;b.avail_out=B;b.next_in=h;b.avail_in=l;d.hold=A;d.bits=v;z(b,J);k=b.next_out;g=b.output;B=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;O=d.lencode[A&(1<<d.lenbits)-1],I=O>>>24,N=O>>>16&255,M=65535&O,!(I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(N&&0===(240&N)){D=
-I;F=N;for(U=M;O=d.lencode[U+((A&(1<<D+F)-1)>>D)],I=O>>>24,N=O>>>16&255,M=65535&O,!(D+I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=I,v-=I,d.back+=I,d.length=M,0===N){d.mode=26;break}if(32&N){d.back=-1;d.mode=12;break}if(64&N){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&N;d.mode=22;case 22:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=23;
-case 23:for(;O=d.distcode[A&(1<<d.distbits)-1],I=O>>>24,N=O>>>16&255,M=65535&O,!(I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(0===(240&N)){D=I;F=N;for(U=M;O=d.distcode[U+((A&(1<<D+F)-1)>>D)],I=O>>>24,N=O>>>16&255,M=65535&O,!(D+I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=I,v-=I,d.back+=I,64&N){b.msg="invalid distance code";d.mode=30;break}d.offset=M;d.extra=15&N;d.mode=24;case 24:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.offset+=
+A+=f[h++]<<v;v+=8}A>>>=I;v-=I;Q=0;G=11+(127&A);A>>>=7;v-=7}if(d.have+G>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;G--;)d.lens[d.have++]=Q}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Y={bits:d.lenbits},T=w(1,d.lens,0,d.nlen,d.lencode,0,d.work,Y),d.lenbits=Y.bits,T){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Y={bits:d.distbits},T=w(2,d.lens,d.nlen,d.ndist,
+d.distcode,0,d.work,Y),d.distbits=Y.bits,T){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=l&&258<=B){b.next_out=k;b.avail_out=B;b.next_in=h;b.avail_in=l;d.hold=A;d.bits=v;z(b,J);k=b.next_out;g=b.output;B=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;O=d.lencode[A&(1<<d.lenbits)-1],I=O>>>24,N=O>>>16&255,M=65535&O,!(I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(N&&0===(240&N)){D=
+I;F=N;for(S=M;O=d.lencode[S+((A&(1<<D+F)-1)>>D)],I=O>>>24,N=O>>>16&255,M=65535&O,!(D+I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=I,v-=I,d.back+=I,d.length=M,0===N){d.mode=26;break}if(32&N){d.back=-1;d.mode=12;break}if(64&N){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&N;d.mode=22;case 22:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=23;
+case 23:for(;O=d.distcode[A&(1<<d.distbits)-1],I=O>>>24,N=O>>>16&255,M=65535&O,!(I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(0===(240&N)){D=I;F=N;for(S=M;O=d.distcode[S+((A&(1<<D+F)-1)>>D)],I=O>>>24,N=O>>>16&255,M=65535&O,!(D+I<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=I,v-=I,d.back+=I,64&N){b.msg="invalid distance code";d.mode=30;break}d.offset=M;d.extra=15&N;d.mode=24;case 24:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.offset+=
A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===B)break a;if(G=J-B,d.offset>G){if(G=d.offset-G,G>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}G>d.wnext?(G-=d.wnext,da=d.wsize-G):da=d.wnext-G;G>d.length&&(G=d.length);N=d.window}else N=g,da=k-d.offset,G=d.length;G>B&&(G=B);B-=G;d.length-=G;do g[k++]=N[da++];while(--G);0===d.length&&(d.mode=21);break;case 26:if(0===B)break a;
-g[k++]=d.length;B--;d.mode=21;break;case 27:if(d.wrap){for(;32>v;){if(0===l)break a;l--;A|=f[h++]<<v;v+=8}if(J-=B,b.total_out+=J,d.total+=J,J&&(b.adler=d.check=d.flags?t(d.check,g,J,k-J):q(d.check,g,J,k-J)),J=B,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}v=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}v=A=0}d.mode=29;case 29:S=1;break a;case 30:S=
+g[k++]=d.length;B--;d.mode=21;break;case 27:if(d.wrap){for(;32>v;){if(0===l)break a;l--;A|=f[h++]<<v;v+=8}if(J-=B,b.total_out+=J,d.total+=J,J&&(b.adler=d.check=d.flags?t(d.check,g,J,k-J):q(d.check,g,J,k-J)),J=B,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}v=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}v=A=0}d.mode=29;case 29:T=1;break a;case 30:T=
-3;break a;case 31:return-4;default:return y}return b.next_out=k,b.avail_out=B,b.next_in=h,b.avail_in=l,d.hold=A,d.bits=v,(d.wsize||J!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,J-b.avail_out)?(d.mode=31,-4):(P-=b.avail_in,J-=b.avail_out,b.total_in+=P,b.total_out+=J,d.total+=J,d.wrap&&J&&(b.adler=d.check=d.flags?t(d.check,g,J,b.next_out-J):q(d.check,g,J,b.next_out-J)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===P&&0===J||4===
-c)&&S===x&&(S=-5),S)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,x)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
+c)&&T===x&&(T=-5),T)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,x)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],k=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,
-25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,p,r,q,t,z){var l,m,n,u,D,F,E,B,A=z.bits,C,L,K,H,V,T,ca=0,W,v=null,P=0,J=new e.Buf16(16);u=new e.Buf16(16);var G=null,da=0;for(C=0;15>=C;C++)J[C]=0;for(L=0;L<p;L++)J[c[d+L]]++;H=A;for(K=15;1<=K&&0===J[K];K--);if(H>K&&(H=K),0===K)return r[q++]=20971520,r[q++]=20971520,z.bits=1,0;for(A=1;A<K&&0===J[A];A++);H<A&&(H=A);for(C=l=1;15>=C;C++)if(l<<=1,l-=J[C],0>l)return-1;if(0<l&&(0===b||1!==K))return-1;u[1]=0;for(C=1;15>C;C++)u[C+1]=u[C]+J[C];
-for(L=0;L<p;L++)0!==c[d+L]&&(t[u[c[d+L]]++]=L);if(0===b?(v=G=t,D=19):1===b?(v=f,P-=257,G=g,da-=257,D=256):(v=h,G=k,D=-1),W=0,L=0,C=A,u=q,V=H,T=0,n=-1,ca=1<<H,p=ca-1,1===b&&852<ca||2===b&&592<ca)return 1;for(var N=0;;){N++;F=C-T;t[L]<D?(E=0,B=t[L]):t[L]>D?(E=G[da+t[L]],B=v[P+t[L]]):(E=96,B=0);l=1<<C-T;A=m=1<<V;do m-=l,r[u+(W>>T)+m]=F<<24|E<<16|B|0;while(0!==m);for(l=1<<C-1;W&l;)l>>=1;if(0!==l?(W&=l-1,W+=l):W=0,L++,0===--J[C]){if(C===K)break;C=c[d+t[L]]}if(C>H&&(W&p)!==n){0===T&&(T=H);u+=A;V=C-T;for(l=
-1<<V;V+T<K&&(l-=J[V+T],!(0>=l));)V++,l<<=1;if(ca+=1<<V,1===b&&852<ca||2===b&&592<ca)return 1;n=W&p;r[n]=H<<24|V<<16|u-q|0}}return 0!==W&&(r[u+W]=C-T<<24|4194304),z.bits=H,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
+25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,p,r,q,t,z){var l,m,n,u,D,F,E,B,A=z.bits,C,L,K,H,V,U,ca=0,W,v=null,P=0,J=new e.Buf16(16);u=new e.Buf16(16);var G=null,da=0;for(C=0;15>=C;C++)J[C]=0;for(L=0;L<p;L++)J[c[d+L]]++;H=A;for(K=15;1<=K&&0===J[K];K--);if(H>K&&(H=K),0===K)return r[q++]=20971520,r[q++]=20971520,z.bits=1,0;for(A=1;A<K&&0===J[A];A++);H<A&&(H=A);for(C=l=1;15>=C;C++)if(l<<=1,l-=J[C],0>l)return-1;if(0<l&&(0===b||1!==K))return-1;u[1]=0;for(C=1;15>C;C++)u[C+1]=u[C]+J[C];
+for(L=0;L<p;L++)0!==c[d+L]&&(t[u[c[d+L]]++]=L);if(0===b?(v=G=t,D=19):1===b?(v=f,P-=257,G=g,da-=257,D=256):(v=h,G=k,D=-1),W=0,L=0,C=A,u=q,V=H,U=0,n=-1,ca=1<<H,p=ca-1,1===b&&852<ca||2===b&&592<ca)return 1;for(var N=0;;){N++;F=C-U;t[L]<D?(E=0,B=t[L]):t[L]>D?(E=G[da+t[L]],B=v[P+t[L]]):(E=96,B=0);l=1<<C-U;A=m=1<<V;do m-=l,r[u+(W>>U)+m]=F<<24|E<<16|B|0;while(0!==m);for(l=1<<C-1;W&l;)l>>=1;if(0!==l?(W&=l-1,W+=l):W=0,L++,0===--J[C]){if(C===K)break;C=c[d+t[L]]}if(C>H&&(W&p)!==n){0===U&&(U=H);u+=A;V=C-U;for(l=
+1<<V;V+U<K&&(l-=J[V+U],!(0>=l));)V++,l<<=1;if(ca+=1<<V,1===b&&852<ca||2===b&&592<ca)return 1;n=W&p;r[n]=H<<24|V<<16|u-q|0}}return 0!==W&&(r[u+W]=C-U<<24|4194304),z.bits=H,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function h(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function k(b,c,d){b.bi_valid>ca-d?(b.bi_buf|=c<<b.bi_valid&65535,h(b,b.bi_buf),b.bi_buf=c>>ca-b.bi_valid,b.bi_valid+=d-ca):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function l(b,c,d){k(b,d[2*c],d[2*c+1])}function m(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;
-while(0<--c);return d>>>1}function n(b,c,d){var e,f=Array(T+1),g=0;for(e=1;e<=T;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function p(b){var c;for(c=0;c<L;c++)b.dyn_ltree[2*c]=0;for(c=0;c<K;c++)b.dyn_dtree[2*c]=0;for(c=0;c<H;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*W]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?h(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=2*c,g=2*d;
-return b[f]<b[g]||b[f]===b[g]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function z(b,c,d){var e,f,g,h,m=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===e?l(b,f,c):(g=U[f],l(b,g+C+1,c),h=G[g],0!==h&&(f-=Q[g],k(b,f,h)),e--,g=256>e?ea[e]:ea[256+(e>>>7)],l(b,g,d),h=da[g],0!==h&&
-(e-=S[g],k(b,e,h)));while(m<b.last_lit)}l(b,W,c)}function w(b,c){var d,e,f,g=c.dyn_tree;e=c.stat_desc.static_tree;var h=c.stat_desc.has_stree,k=c.stat_desc.elems,l=-1;b.heap_len=0;b.heap_max=V;for(d=0;d<k;d++)0!==g[2*d]?(b.heap[++b.heap_len]=l=d,b.depth[d]=0):g[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>l?++l:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,h&&(b.static_len-=e[2*f+1]);c.max_code=l;for(d=b.heap_len>>1;1<=d;d--)t(b,g,d);f=k;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),e=b.heap[1],
-b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,v,h=c.dyn_tree,k=c.max_code,p=c.stat_desc.static_tree,q=c.stat_desc.has_stree,r=c.stat_desc.extra_bits,J=c.stat_desc.extra_base,P=c.stat_desc.max_length,G=0;for(e=0;e<=T;e++)b.bl_count[e]=0;h[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<V;d++)f=b.heap[d],e=h[2*h[2*f+1]+1]+
+while(0<--c);return d>>>1}function n(b,c,d){var e,f=Array(U+1),g=0;for(e=1;e<=U;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function p(b){var c;for(c=0;c<L;c++)b.dyn_ltree[2*c]=0;for(c=0;c<K;c++)b.dyn_dtree[2*c]=0;for(c=0;c<H;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*W]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?h(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=2*c,g=2*d;
+return b[f]<b[g]||b[f]===b[g]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function z(b,c,d){var e,f,g,h,m=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===e?l(b,f,c):(g=S[f],l(b,g+C+1,c),h=G[g],0!==h&&(f-=Q[g],k(b,f,h)),e--,g=256>e?ea[e]:ea[256+(e>>>7)],l(b,g,d),h=da[g],0!==h&&
+(e-=T[g],k(b,e,h)));while(m<b.last_lit)}l(b,W,c)}function w(b,c){var d,e,f,g=c.dyn_tree;e=c.stat_desc.static_tree;var h=c.stat_desc.has_stree,k=c.stat_desc.elems,l=-1;b.heap_len=0;b.heap_max=V;for(d=0;d<k;d++)0!==g[2*d]?(b.heap[++b.heap_len]=l=d,b.depth[d]=0):g[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>l?++l:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,h&&(b.static_len-=e[2*f+1]);c.max_code=l;for(d=b.heap_len>>1;1<=d;d--)t(b,g,d);f=k;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),e=b.heap[1],
+b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,v,h=c.dyn_tree,k=c.max_code,p=c.stat_desc.static_tree,q=c.stat_desc.has_stree,r=c.stat_desc.extra_bits,J=c.stat_desc.extra_base,P=c.stat_desc.max_length,G=0;for(e=0;e<=U;e++)b.bl_count[e]=0;h[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<V;d++)f=b.heap[d],e=h[2*h[2*f+1]+1]+
1,e>P&&(e=P,G++),h[2*f+1]=e,f>k||(b.bl_count[e]++,m=0,f>=J&&(m=r[f-J]),v=h[2*f],b.opt_len+=v*(e+m),q&&(b.static_len+=v*(p[2*f+1]+m)));if(0!==G){do{for(e=P-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[P]--;G-=2}while(0<G);for(e=P;0!==e;e--)for(f=b.bl_count[e];0!==f;)m=b.heap[--d],m>k||(h[2*m+1]!==e&&(b.opt_len+=(e-h[2*m+1])*h[2*m],h[2*m+1]=e),f--)}n(g,l,b.bl_count)}function x(b,c,d){var e,f,g=-1,h=c[1],k=0,l=7,m=4;0===h&&(l=138,m=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=h,
h=c[2*(e+1)+1],++k<l&&f===h||(k<m?b.bl_tree[2*f]+=k:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*v]++):10>=k?b.bl_tree[2*P]++:b.bl_tree[2*J]++,k=0,g=f,0===h?(l=138,m=3):f===h?(l=6,m=3):(l=7,m=4))}function y(b,c,d){var e,f,g=-1,h=c[1],m=0,n=7,p=4;0===h&&(n=138,p=3);for(e=0;e<=d;e++)if(f=h,h=c[2*(e+1)+1],!(++m<n&&f===h)){if(m<p){do l(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(l(b,f,b.bl_tree),m--),l(b,v,b.bl_tree),k(b,m-3,2)):10>=m?(l(b,P,b.bl_tree),k(b,m-3,3)):(l(b,J,b.bl_tree),k(b,m-11,7));m=
-0;g=f;0===h?(n=138,p=3):f===h?(n=6,p=3):(n=7,p=4)}}function u(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return B;for(c=32;c<C;c++)if(0!==b.dyn_ltree[2*c])return B;return E}function D(b,c,d,e){k(b,(A<<1)+(e?1:0),3);r(b);h(b,d);h(b,~d);F.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var F=b("../utils/common"),E=0,B=1,A=0,C=256,L=C+1+29,K=30,H=19,V=2*L+1,T=15,ca=16,W=256,v=16,P=17,
-J=18,G=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],da=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=Array(2*(L+2));e(M);var aa=Array(2*K);e(aa);var ea=Array(512);e(ea);var U=Array(256);e(U);var Q=Array(29);e(Q);var S=Array(K);e(S);var Y,O,R,fa=!1;d._tr_init=function(b){if(!fa){var c,d,e,h=Array(T+1);for(e=d=0;28>e;e++)for(Q[e]=d,c=0;c<1<<G[e];c++)U[d++]=e;U[d-1]=e;
-for(e=d=0;16>e;e++)for(S[e]=d,c=0;c<1<<da[e];c++)ea[d++]=e;for(d>>=7;e<K;e++)for(S[e]=d<<7,c=0;c<1<<da[e]-7;c++)ea[256+d++]=e;for(c=0;c<=T;c++)h[c]=0;for(c=0;143>=c;)M[2*c+1]=8,c++,h[8]++;for(;255>=c;)M[2*c+1]=9,c++,h[9]++;for(;279>=c;)M[2*c+1]=7,c++,h[7]++;for(;287>=c;)M[2*c+1]=8,c++,h[8]++;n(M,L+1,h);for(c=0;c<K;c++)aa[2*c+1]=5,aa[2*c]=m(c,5);Y=new f(M,G,C+1,L,T);O=new f(aa,da,0,K,T);R=new f([],N,0,H,7);fa=!0}b.l_desc=new g(b.dyn_ltree,Y);b.d_desc=new g(b.dyn_dtree,O);b.bl_desc=new g(b.bl_tree,
+0;g=f;0===h?(n=138,p=3):f===h?(n=6,p=3):(n=7,p=4)}}function u(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return B;for(c=32;c<C;c++)if(0!==b.dyn_ltree[2*c])return B;return E}function D(b,c,d,e){k(b,(A<<1)+(e?1:0),3);r(b);h(b,d);h(b,~d);F.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var F=b("../utils/common"),E=0,B=1,A=0,C=256,L=C+1+29,K=30,H=19,V=2*L+1,U=15,ca=16,W=256,v=16,P=17,
+J=18,G=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],da=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=Array(2*(L+2));e(M);var aa=Array(2*K);e(aa);var ea=Array(512);e(ea);var S=Array(256);e(S);var Q=Array(29);e(Q);var T=Array(K);e(T);var Y,O,R,fa=!1;d._tr_init=function(b){if(!fa){var c,d,e,h=Array(U+1);for(e=d=0;28>e;e++)for(Q[e]=d,c=0;c<1<<G[e];c++)S[d++]=e;S[d-1]=e;
+for(e=d=0;16>e;e++)for(T[e]=d,c=0;c<1<<da[e];c++)ea[d++]=e;for(d>>=7;e<K;e++)for(T[e]=d<<7,c=0;c<1<<da[e]-7;c++)ea[256+d++]=e;for(c=0;c<=U;c++)h[c]=0;for(c=0;143>=c;)M[2*c+1]=8,c++,h[8]++;for(;255>=c;)M[2*c+1]=9,c++,h[9]++;for(;279>=c;)M[2*c+1]=7,c++,h[7]++;for(;287>=c;)M[2*c+1]=8,c++,h[8]++;n(M,L+1,h);for(c=0;c<K;c++)aa[2*c+1]=5,aa[2*c]=m(c,5);Y=new f(M,G,C+1,L,U);O=new f(aa,da,0,K,U);R=new f([],N,0,H,7);fa=!0}b.l_desc=new g(b.dyn_ltree,Y);b.d_desc=new g(b.dyn_dtree,O);b.bl_desc=new g(b.bl_tree,
R);b.bi_buf=0;b.bi_valid=0;p(b)};d._tr_stored_block=D;d._tr_flush_block=function(b,c,d,e){var f,g,h=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=u(b));w(b,b.l_desc);w(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);w(b,b.bl_desc);for(h=H-1;3<=h&&0===b.bl_tree[2*I[h]+1];h--);h=(b.opt_len+=3*(h+1)+14,h);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=d+5;if(d+4<=f&&-1!==c)D(b,c,d,e);else if(4===b.strategy||g===f)k(b,2+(e?1:0),3),z(b,M,aa);
-else{k(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;h+=1;k(b,c-257,5);k(b,d-1,5);k(b,h-4,4);for(f=0;f<h;f++)k(b,b.bl_tree[2*I[f]+1],3);y(b,b.dyn_ltree,c-1);y(b,b.dyn_dtree,d-1);z(b,b.dyn_ltree,b.dyn_dtree)}p(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(U[d]+C+1)]++,b.dyn_dtree[2*(256>
+else{k(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;h+=1;k(b,c-257,5);k(b,d-1,5);k(b,h-4,4);for(f=0;f<h;f++)k(b,b.bl_tree[2*I[f]+1],3);y(b,b.dyn_ltree,c-1);y(b,b.dyn_dtree,d-1);z(b,b.dyn_ltree,b.dyn_dtree)}p(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(S[d]+C+1)]++,b.dyn_dtree[2*(256>
c?ea[c]:ea[256+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){k(b,2,3);l(b,W,M);16===b.bi_valid?(h(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,
c,d){d=b("./lib/utils/common").assign;var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var JSON;JSON||(JSON={});
(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,l,m,t=f,z,w=d[a];w&&"object"===typeof w&&"function"===typeof w.toJSON&&(w=w.toJSON(a));"function"===typeof k&&(w=k.call(d,a,w));switch(typeof w){case "string":return b(w);case "number":return isFinite(w)?""+w:"null";case "boolean":case "null":return""+w;
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.43",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.1.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&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/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,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/")||
@@ -1711,7 +1711,7 @@ new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return t
v=mxUtils.createXmlDocument(),q=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"svg"):v.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+a));null==v.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/p;var r=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),t=Math.max(1,Math.ceil(n.height*
a)+2*c)+(l?5:0);q.setAttribute("version","1.1");q.setAttribute("width",r+"px");q.setAttribute("height",t+"px");q.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+r+" "+t);v.appendChild(q);var u=this.createSvgCanvas(q);u.foOffset=e?-.5:0;u.textOffset=e?-.5:0;u.imageOffset=e?-.5:0;u.translate(Math.floor((c/b-n.x)/p),Math.floor((c/b-n.y)/p));var J=document.createElement("textarea"),P=u.createAlternateContent;u.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,p){var v=this.state;if(null!=this.foAltText&&
(0==d||0!=v.fontSize&&f.length<5*d/v.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+v.fontSize)/2));q.setAttribute("fill",v.fontColor||"black");q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(v.fontSize)+"px");q.setAttribute("font-family",v.fontFamily);(v.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(v.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
-q.setAttribute("font-style","italic");(v.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");try{return J.innerHTML=f,q.textContent=J.value,q}catch(ga){return P.apply(this,arguments)}}else return P.apply(this,arguments)};var w=this.backgroundImage;if(null!=w){b=p/b;var x=this.view.translate,y=new mxRectangle(x.x*b,x.y*b,w.width*b,w.height*b);mxUtils.intersects(n,y)&&u.image(x.x,x.y,w.width,w.height,w.src,!0)}u.scale(a);u.textEnabled=g;h=
+q.setAttribute("font-style","italic");(v.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");try{return J.innerHTML=f,q.textContent=J.value,q}catch(ha){return P.apply(this,arguments)}}else return P.apply(this,arguments)};var w=this.backgroundImage;if(null!=w){b=p/b;var x=this.view.translate,y=new mxRectangle(x.x*b,x.y*b,w.width*b,w.height*b);mxUtils.intersects(n,y)&&u.image(x.x,x.y,w.width,w.height,w.src,!0)}u.scale(a);u.textEnabled=g;h=
null!=h?h:this.createSvgImageExport();var G=h.drawCellState;h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&G.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),u);this.updateSvgLinks(q,k,!0);return q}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");
for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&
(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",
@@ -1783,18 +1783,18 @@ this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.grap
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var K=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){K.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var H=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
function(){H.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var V=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){V.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
-null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var T=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(T.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
+null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var U=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(U.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var ca=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ca.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var W=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){W.apply(this,arguments);null!=this.linkHint&&
(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function h(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function q(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function x(){mxActor.call(this)}function y(){mxActor.call(this)}function u(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function E(){mxShape.call(this)}function B(){mxShape.call(this)}
-function A(){mxEllipse.call(this)}function C(){mxShape.call(this)}function L(){mxShape.call(this)}function K(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function V(){mxShape.call(this)}function T(){mxShape.call(this)}function ca(){mxShape.call(this)}function W(){mxShape.call(this)}function v(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function J(){mxDoubleEllipse.call(this)}function G(){mxArrowConnector.call(this);this.spacing=0}function da(){mxArrowConnector.call(this);
-this.spacing=0}function N(){mxActor.call(this)}function I(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}function aa(){mxActor.call(this)}function ea(){mxActor.call(this)}function U(){mxActor.call(this)}function Q(){mxActor.call(this)}function S(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function fa(){mxActor.call(this)}function X(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
-function wa(){mxRhombus.call(this)}function xa(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function na(){mxActor.call(this)}function la(){mxActor.call(this)}function ma(){mxActor.call(this)}function ja(){mxConnector.call(this)}function Ca(a,b,c,d,e,f,g,h,k,l){g+=k;var m=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(m.x-e-g,m.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+function A(){mxEllipse.call(this)}function C(){mxShape.call(this)}function L(){mxShape.call(this)}function K(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function V(){mxShape.call(this)}function U(){mxShape.call(this)}function ca(){mxShape.call(this)}function W(){mxShape.call(this)}function v(){mxCylinder.call(this)}function P(){mxDoubleEllipse.call(this)}function J(){mxDoubleEllipse.call(this)}function G(){mxArrowConnector.call(this);this.spacing=0}function da(){mxArrowConnector.call(this);
+this.spacing=0}function N(){mxActor.call(this)}function I(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}function aa(){mxActor.call(this)}function ea(){mxActor.call(this)}function S(){mxActor.call(this)}function Q(){mxActor.call(this)}function T(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function fa(){mxActor.call(this)}function X(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
+function xa(){mxRhombus.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}function pa(){mxActor.call(this)}function na(){mxActor.call(this)}function oa(){mxActor.call(this)}function ka(){mxConnector.call(this)}function Da(a,b,c,d,e,f,g,h,k,l){g+=k;var ma=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(ma.x-e-g,ma.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),h=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,
f);a.lineTo(d,e);a.lineTo(f,e);a.lineTo(0,e-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-f,0),a.lineTo(d,f),a.lineTo(f,f),a.close(),a.fill()),0!=h&&(a.setFillAlpha(Math.abs(h)),a.setFillColor(0>h?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,e),a.lineTo(0,e-f),a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,
-0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Aa=Math.tan(mxUtils.toRadians(30)),ka=(.5-Aa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Aa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*
-b,b*ka);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ka)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Aa));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-ka)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ka)*b),a.lineTo(.5*b,(1-ka)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ka),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ka)*b),a.lineTo(0,
+0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Ba=Math.tan(mxUtils.toRadians(30)),la=(.5-Ba)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Ba);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*
+b,b*la);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-la)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Ba));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-la)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-la)*b),a.lineTo(.5*b,(1-la)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*la),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-la)*b),a.lineTo(0,
.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",c);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,
b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(e,mxCylinder);e.prototype.size=30;e.prototype.darkOpacity=0;e.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),
g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.end(),a.stroke())};
@@ -1803,7 +1803,7 @@ c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.
30;h.prototype.isRoundable=function(){return!0};h.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",h);mxUtils.extend(k,mxActor);k.prototype.size=.4;k.prototype.redrawPath=
function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==
mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",k);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var Ga=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Ga.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var Ha=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Ha.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.isRoundable=function(){return!0};n.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",n);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,
@@ -1811,10 +1811,10 @@ e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRend
b;this.firstX=a;this.firstY=b};q.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};q.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};q.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};q.prototype.arcTo=function(a,b,c,d,
e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var k=c(a-this.lastX)*d/g,c=c(b-this.lastY)*e/g,
d=d/f,e=e/f,f=0;f<g;f++){var l=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,k*f+this.lastX-l*e,c*f+this.lastY-l*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
-var Ha=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ha.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ia=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
-this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ia.apply(this,arguments)};var Ja=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ja.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||
+var Ia=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ia.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ja=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
+this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ja.apply(this,arguments)};var Ka=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ka.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||
(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f),
-a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ka=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ka.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var La=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&La.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};t.prototype.paintForeground=
function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",t);mxUtils.extend(z,
mxRectangleShape);z.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};z.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",z);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable=
@@ -1822,17 +1822,17 @@ function(){return!0};w.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getVal
this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(x,mxActor);x.prototype.size=.2;x.prototype.fixedSize=20;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",x);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(u,mxRectangleShape);u.prototype.isHtmlAllowed=function(){return!1};u.prototype.paintForeground=function(a,
-b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",u);var Da=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Da.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Da.apply(this,[a,b,c,d,e]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
+b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",u);var Ea=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ea.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ea.apply(this,[a,b,c,d,e]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};D.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+
-f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],l=this.style["symbol"+f+"Width"],m=this.style["symbol"+f+"Height"],ra=this.style["symbol"+f+"Spacing"]||0,n=this.style["symbol"+f+"VSpacing"]||ra,p=this.style["symbol"+f+"ArcSpacing"];null!=p&&(p*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),ra+=p,n+=p);var p=b,q=c,p=h==mxConstants.ALIGN_CENTER?p+(d-l)/2:h==mxConstants.ALIGN_RIGHT?p+(d-l-ra):p+ra,q=k==mxConstants.ALIGN_MIDDLE?q+(e-m)/2:k==mxConstants.ALIGN_BOTTOM?
-q+(e-m-n):q+n;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,p,q,l,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(E,mxShape);
-E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",E);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,
-b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",A);mxUtils.extend(C,
-mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",C);mxUtils.extend(L,mxShape);L.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};L.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};
-L.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",L);mxUtils.extend(K,mxRectangleShape);K.prototype.size=40;K.prototype.isHtmlAllowed=function(){return!1};K.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};K.prototype.paintBackground=function(a,b,c,d,
-e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=K&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};K.prototype.paintForeground=function(a,
-b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",K);mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],l=this.style["symbol"+f+"Width"],m=this.style["symbol"+f+"Height"],ma=this.style["symbol"+f+"Spacing"]||0,n=this.style["symbol"+f+"VSpacing"]||ma,ga=this.style["symbol"+f+"ArcSpacing"];null!=ga&&(ga*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),ma+=ga,n+=ga);var ga=b,p=c,ga=h==mxConstants.ALIGN_CENTER?ga+(d-l)/2:h==mxConstants.ALIGN_RIGHT?ga+(d-l-ma):ga+ma,p=k==mxConstants.ALIGN_MIDDLE?p+(e-m)/
+2:k==mxConstants.ALIGN_BOTTOM?p+(e-m-n):p+n;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,ga,p,l,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
+F);mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",E);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=
+function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",B);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
+A);mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",C);mxUtils.extend(L,mxShape);L.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};L.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
+e/8,d,7*e/8);a.fillAndStroke()};L.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",L);mxUtils.extend(K,mxRectangleShape);K.prototype.size=40;K.prototype.isHtmlAllowed=function(){return!1};K.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};K.prototype.paintBackground=
+function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=K&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};K.prototype.paintForeground=
+function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",K);mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
"height",this.height)*this.scale))};H.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",H);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=K.prototype.size;
null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
@@ -1846,8 +1846,8 @@ Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),n
Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+l),new mxPoint(g+e,h+l),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(m,h),new mxPoint(g+k,h+e),new mxPoint(g+k,h+l),new mxPoint(m,h+l-e),new mxPoint(g,h+l),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(l,f)):l*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(m,h+e),new mxPoint(g+
k,h),new mxPoint(g+k,h+l-e),new mxPoint(m,h+l),new mxPoint(g,h+l-e),new mxPoint(g,h)]);m=new mxPoint(m,a);d&&(c.x<g||c.x>g+k?m.y=c.y:m.x=c.x);return mxUtils.getPerimeterPoint(h,m,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+
-h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(V,mxShape);V.prototype.size=10;V.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",V);mxUtils.extend(T,mxShape);T.prototype.size=
-10;T.prototype.inset=2;T.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",T);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=
+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(V,mxShape);V.prototype.size=10;V.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",V);mxUtils.extend(U,mxShape);U.prototype.size=
+10;U.prototype.inset=2;U.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",U);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=
function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ca);mxUtils.extend(W,mxShape);W.prototype.inset=2;W.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
W);mxUtils.extend(v,mxCylinder);v.prototype.jettyWidth=32;v.prototype.jettyHeight=12;v.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),
a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",v);mxUtils.extend(P,mxDoubleEllipse);P.prototype.outerStroke=!0;P.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",P);
@@ -1858,80 +1858,99 @@ I.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paint
a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",I);mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",M);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",aa);mxUtils.extend(ea,mxActor);ea.prototype.dx=20;ea.prototype.dy=20;ea.prototype.redrawPath=
function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,
-c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ea);mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",U);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize))));c=(e-f)/2;var f=
-c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",Q);mxUtils.extend(S,mxActor);S.prototype.size=.1;S.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",S);mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",Y);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();
+c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ea);mxUtils.extend(S,mxActor);S.prototype.arrowWidth=.3;S.prototype.arrowSize=.2;S.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",S);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize))));c=(e-f)/2;var f=
+c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",Q);mxUtils.extend(T,mxActor);T.prototype.size=.1;T.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",T);mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",Y);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();
a.end()};mxCellRenderer.registerShape("xor",O);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);
a.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};
mxCellRenderer.registerShape("offPageConnector",fa);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();
-a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Z);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(wa,
-mxRhombus);wa.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",wa);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};
-mxCellRenderer.registerShape("collate",xa);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ya);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=
+a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Z);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(xa,
+mxRhombus);xa.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};
+mxCellRenderer.registerShape("collate",ya);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",za);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=
function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&
-a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",za);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",qa);mxUtils.extend(na,mxActor);na.prototype.redrawPath=
-function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",na);mxUtils.extend(la,mxActor);la.prototype.size=.2;la.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,
-c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",la);mxUtils.extend(ma,mxActor);ma.prototype.size=.25;ma.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",ma);mxUtils.extend(ja,
-mxConnector);ja.prototype.origPaintEdgeShape=ja.prototype.paintEdgeShape;ja.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;ja.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),ja.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",
-ja);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+
-n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ca);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Ca.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);return function(){n.apply(this,
+a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Aa);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",sa);mxUtils.extend(pa,mxActor);pa.prototype.redrawPath=
+function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",pa);mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,
+c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",na);mxUtils.extend(oa,mxActor);oa.prototype.size=.25;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",oa);mxUtils.extend(ka,
+mxConnector);ka.prototype.origPaintEdgeShape=ka.prototype.paintEdgeShape;ka.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;ka.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),ka.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",
+ka);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+
+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Da);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Da.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);return function(){n.apply(this,
arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*k,m.y-2*q+f*k);a.moveTo(m.x-p-q+f*k,m.y-q+p-e*k);a.lineTo(m.x+q-p-f*k,m.y-q-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",
-function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,b,c){return ga(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=
-Math.round(2*b)/a.view.scale-c})},ga=function(a,b,c,d,e){return ba(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,n=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
-n,h/n,m/n,l,g,d,f)})},ia=function(a){return function(b){return[ba(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
-Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ba=function(a,b,c){return function(d){var e=[ba(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ha(d));return e}},sa=function(a,b,c,d,e){c=null!=
+function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Fa=function(a,b,c){return ha(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=
+Math.round(2*b)/a.view.scale-c})},ha=function(a,b,c,d,e){return ba(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,n=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
+n,h/n,m/n,l,g,d,f)})},ja=function(a){return function(b){return[ba(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",S.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",S.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
+Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ca=function(a,b,c){return function(d){var e=[ba(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ia(d));return e}},ta=function(a,b,c,d,e){c=null!=
c?c:1;return function(f){var g=[ba(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=
-a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ha(f));return g}},Fa=function(a){return function(b){var c=[ba(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ha(b));return c}},oa=function(){return function(a){var b=
-[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b}},ha=function(a,b){return ba(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/
+a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ia(f));return g}},Ga=function(a){return function(b){var c=[ba(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ia(b));return c}},qa=function(){return function(a){var b=
+[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b}},ia=function(a,b){return ba(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/
100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},ba=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);
-g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ta={link:function(a){return[Ea(a,!0,10),Ea(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ga(a,
+g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ua={link:function(a){return[Fa(a,!0,10),Fa(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ha(a,
["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=
-Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ga(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ha(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ga(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*
+parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ha(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*
a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
-b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ga(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=
+b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ha(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=
Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[ba(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),
-b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ha(a,c/2))}return b},
-label:oa(),ext:oa(),rectangle:oa(),triangle:oa(),rhombus:oa(),umlLifeline:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[ba(a,["width","height"],function(a){var b=Math.max(H.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ia(a,c/2))}return b},
+label:qa(),ext:qa(),rectangle:qa(),triangle:qa(),rhombus:qa(),umlLifeline:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[ba(a,["width","height"],function(a){var b=Math.max(H.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
"width",H.prototype.width))),c=Math.max(1.5*H.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",H.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(H.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*H.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[ba(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},cross:function(a){return[ba(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",la.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},cross:function(a){return[ba(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",na.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
-[ba(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",N.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},dataStorage:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));
+[ba(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",N.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},dataStorage:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));
return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[ba(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),ba(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
(b.x-a.x)/a.width)))/100}),ba(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},internalStorage:function(a){var b=[ba(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",I.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",I.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
-b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ha(a));return b},corner:function(a){return[ba(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",M.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},internalStorage:function(a){var b=[ba(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",I.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",I.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},corner:function(a){return[ba(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",M.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[ba(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ea.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ea.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,b.y-a.y)))})]},singleArrow:ia(1),doubleArrow:ia(.5),folder:function(a){return[ba(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
+Math.min(a.height,b.y-a.y)))})]},singleArrow:ja(1),doubleArrow:ja(.5),folder:function(a){return[ba(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[ba(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));
-return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:sa(x.prototype.size,!0,null,!0,x.prototype.fixedSize),hexagon:sa(y.prototype.size,!0,.5,!0),curlyBracket:sa(p.prototype.size,!1),display:sa(ma.prototype.size,!1),cube:Ba(1,a.prototype.size,!1),card:Ba(.5,h.prototype.size,!0),loopLimit:Ba(.5,R.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=ba;Graph.handleFactory=ta;mxVertexHandler.prototype.createCustomHandles=
-function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=ta[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=ta[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
-this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=ta[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ua=new mxPoint(1,0),va=new mxPoint(1,0),ia=mxUtils.toRadians(-30),ua=mxUtils.getRotatedPoint(ua,Math.cos(ia),Math.sin(ia)),ia=mxUtils.toRadians(-150),va=mxUtils.getRotatedPoint(va,Math.cos(ia),Math.sin(ia));mxEdgeStyle.IsometricConnector=function(a,b,
-c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ua.x,l=ua.y,m=va.x,n=va.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*
-b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var La=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return La.apply(this,
-arguments)};b.prototype.constraints=[];c.prototype.constraints=[];w.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
-.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
-1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;
-a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;N.prototype.constraints=
-mxRectangleShape.prototype.constraints;na.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,
-.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,
-0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,
-0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,
-.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];V.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ta(x.prototype.size,!0,null,!0,x.prototype.fixedSize),hexagon:ta(y.prototype.size,!0,.5,!0),curlyBracket:ta(p.prototype.size,!1),display:ta(oa.prototype.size,!1),cube:Ca(1,a.prototype.size,!1),card:Ca(.5,h.prototype.size,!0),loopLimit:Ca(.5,R.prototype.size,!0),trapezoid:Ga(.5),parallelogram:Ga(1)};Graph.createHandle=ba;Graph.handleFactory=ua;mxVertexHandler.prototype.createCustomHandles=
+function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=ua[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=ua[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=
+this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=ua[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ja=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ja),Math.sin(ja)),ja=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ja),Math.sin(ja));mxEdgeStyle.IsometricConnector=function(a,b,
+c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=va.x,l=va.y,m=wa.x,n=wa.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*
+b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ma=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Ma.apply(this,
+arguments)};b.prototype.constraints=[];c.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,
+"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),
+!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,
+1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.constraints=mxRectangleShape.prototype.constraints;
+e.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};h.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(c-d)));return a};g.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;sa.prototype.constraints=mxEllipse.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;
+pa.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};R.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,
+.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
+.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,
+.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,
+.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
+1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,
.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ea.prototype.constraints=null;M.prototype.constraints=null;aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];K.prototype.constraints=null;Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})(); \ No newline at end of file
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ea.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};M.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+1),!1)];S.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};Q.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",S.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,c));return a};na.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,f=d+e,g=(b-e)/2,e=g+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};K.prototype.constraints=null;Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,
+.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})(); \ No newline at end of file
diff --git a/src/main/webapp/js/shapes.min.js b/src/main/webapp/js/shapes.min.js
index 886fe291..4522ceed 100644
--- a/src/main/webapp/js/shapes.min.js
+++ b/src/main/webapp/js/shapes.min.js
@@ -1458,28 +1458,38 @@ mxShapeArrows2Arrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead L
mxShapeArrows2Arrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.begin();a.moveTo(0,d);a.lineTo(b-e,d);a.lineTo(b-e,0);a.lineTo(b,.5*c);a.lineTo(b-e,c);a.lineTo(b-e,c-d);a.lineTo(0,c-d);a.lineTo(f,.5*c);a.close();a.fillAndStroke()};
mxShapeArrows2Arrow.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=a.width,e=a.height,b,c,f=this.direction||mxConstants.DIRECTION_EAST;mxUtils.getValue(this.style,"flipH",!1)&&(f==mxConstants.DIRECTION_WEST?f=mxConstants.DIRECTION_EAST:f==mxConstants.DIRECTION_EAST&&(f=mxConstants.DIRECTION_WEST));mxUtils.getValue(this.style,"flipV",!1)&&(f==mxConstants.DIRECTION_NORTH?f=mxConstants.DIRECTION_SOUTH:f==mxConstants.DIRECTION_SOUTH&&(f=mxConstants.DIRECTION_NORTH));
f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH?(b=.5*d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))))):(b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))));return f==mxConstants.DIRECTION_EAST?new mxRectangle(a.x,a.y+b,d-c,e-2*b):f==mxConstants.DIRECTION_WEST?
-new mxRectangle(a.x+c,a.y+b,d-c,e-2*b):f==mxConstants.DIRECTION_NORTH?new mxRectangle(a.x+b,a.y+c,d-2*b,e-c):new mxRectangle(a.x+b,a.y,d-2*b,e-c)}return a};mxCellRenderer.registerShape(mxShapeArrows2Arrow.prototype.cst.ARROW,mxShapeArrows2Arrow);mxShapeArrows2Arrow.prototype.constraints=null;
+new mxRectangle(a.x+c,a.y+b,d-c,e-2*b):f==mxConstants.DIRECTION_NORTH?new mxRectangle(a.x+b,a.y+c,d-2*b,e-c):new mxRectangle(a.x+b,a.y,d-2*b,e-c)}return a};mxCellRenderer.registerShape(mxShapeArrows2Arrow.prototype.cst.ARROW,mxShapeArrows2Arrow);
Graph.handleFactory[mxShapeArrows2Arrow.prototype.cst.ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+a.width-b,a.y+c*a.height/2)},function(a,b){this.state.style.dx=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),
a.x+a.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(1,(b.y-a.y)/a.height*2)))/100})];a=Graph.createHandle(a,["notch"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+b,a.y+a.height/2)},function(a,b){this.state.style.notch=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),b.x-a.x)))/100});d.push(a);return d};
+mxShapeArrows2Arrow.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e-b));return a};
function mxShapeArrows2TwoWayArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5}mxUtils.extend(mxShapeArrows2TwoWayArrow,mxActor);mxShapeArrows2TwoWayArrow.prototype.cst={TWO_WAY_ARROW:"mxgraph.arrows2.twoWayArrow"};mxShapeArrows2TwoWayArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:35},{name:"dy",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.6}];
mxShapeArrows2TwoWayArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.begin();a.moveTo(e,d);a.lineTo(b-e,d);a.lineTo(b-e,0);a.lineTo(b,.5*c);a.lineTo(b-e,c);a.lineTo(b-e,c-d);a.lineTo(e,c-d);a.lineTo(e,c);a.lineTo(0,.5*c);a.lineTo(e,0);a.close();a.fillAndStroke()};
mxShapeArrows2TwoWayArrow.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=a.width,e=a.height,b=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH,c,f;b?(c=.5*d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))))):(c=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),f=Math.max(0,Math.min(d,
parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))));return b?new mxRectangle(a.x+c,a.y+f,d-2*c,e-2*f):new mxRectangle(a.x+f,a.y+c,d-2*f,e-2*c)}return a};mxCellRenderer.registerShape(mxShapeArrows2TwoWayArrow.prototype.cst.TWO_WAY_ARROW,mxShapeArrows2TwoWayArrow);mxShapeArrows2TwoWayArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2TwoWayArrow.prototype.cst.TWO_WAY_ARROW]=function(a){return[Graph.createHandle(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+a.width-d,a.y+b*a.height/2)},function(a,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(a.width/2,a.x+a.width-e.x)))/100;this.state.style.dy=Math.round(100*
-Math.max(0,Math.min(1,(e.y-a.y)/a.height*2)))/100})]};function mxShapeArrows2StylisedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0;this.feather=.5}mxUtils.extend(mxShapeArrows2StylisedArrow,mxActor);
+Math.max(0,Math.min(1,(e.y-a.y)/a.height*2)))/100})]};
+mxShapeArrows2TwoWayArrow.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-b));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,e-b));return a};
+function mxShapeArrows2StylisedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0;this.feather=.5}mxUtils.extend(mxShapeArrows2StylisedArrow,mxActor);
mxShapeArrows2StylisedArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:40},{name:"dy",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.6},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0},{name:"feather",dispName:"Feather",type:"float",min:0,max:1,defVal:.4}];mxShapeArrows2StylisedArrow.prototype.cst={STYLISED_ARROW:"mxgraph.arrows2.stylisedArrow"};
mxShapeArrows2StylisedArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"feather",this.feather))));a.begin();a.moveTo(0,g);a.lineTo(b-e,d);a.lineTo(b-e-10,0);
a.lineTo(b,.5*c);a.lineTo(b-e-10,c);a.lineTo(b-e,c-d);a.lineTo(0,c-g);a.lineTo(f,.5*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2StylisedArrow.prototype.cst.STYLISED_ARROW,mxShapeArrows2StylisedArrow);mxShapeArrows2StylisedArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2StylisedArrow.prototype.cst.STYLISED_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width-10,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+a.width-b,a.y+d*a.height/2)},function(a,c){this.state.style.dx=Math.round(100*Math.max(0,Math.min(a.width-10,a.width-parseFloat(mxUtils.getValue(this.state.style,
"notch",this.notch)),a.x+a.width-c.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(1,(c.y-a.y)/a.height*2)))/100})],e=Graph.createHandle(a,["notch"],function(a){var b=Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+b,a.y+a.height/2)},function(a,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,
"dx",this.dx)),c.x-a.x)))/100});d.push(e);a=Graph.createHandle(a,["feather"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"feather",this.dy))));return new mxPoint(a.x,a.y+b*a.height/2)},function(a,c){this.state.style.feather=Math.round(100*Math.max(0,Math.min(1,(c.y-a.y)/a.height*2)))/100});d.push(a);return d};
-function mxShapeArrows2SharpArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx2=this.dx1=this.dy1=.5;this.notch=0}mxUtils.extend(mxShapeArrows2SharpArrow,mxActor);mxShapeArrows2SharpArrow.prototype.cst={SHARP_ARROW:"mxgraph.arrows2.sharpArrow"};
+mxShapeArrows2StylisedArrow.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"feather",this.feather))));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c-10,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c-10,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(b+g)));
+a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e-.5*(b+g)));return a};function mxShapeArrows2SharpArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx2=this.dx1=this.dy1=.5;this.notch=0}mxUtils.extend(mxShapeArrows2SharpArrow,mxActor);mxShapeArrows2SharpArrow.prototype.cst={SHARP_ARROW:"mxgraph.arrows2.sharpArrow"};
mxShapeArrows2SharpArrow.prototype.customProperties=[{name:"dx1",dispName:"Arrowhead Arrow Width",type:"float",min:0,defVal:18},{name:"dy1",dispName:"Arrow Arrow Width",type:"float",min:0,max:1,defVal:.67},{name:"dx2",dispName:"Arrowhead Angle",type:"float",min:0,defVal:18},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0}];
mxShapeArrows2SharpArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),h=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),
k=.5*c*Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),l=0;0!=c&&(l=h+f*k*2/c);a.begin();a.moveTo(0,d);a.lineTo(b-e,d);a.lineTo(b-l,0);a.lineTo(b-f,0);a.lineTo(b,.5*c);a.lineTo(b-f,c);a.lineTo(b-l,c);a.lineTo(b-e,c-d);a.lineTo(0,c-d);a.lineTo(g,.5*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2SharpArrow.prototype.cst.SHARP_ARROW,mxShapeArrows2SharpArrow);mxShapeArrows2SharpArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2SharpArrow.prototype.cst.SHARP_ARROW]=function(a){var d=[Graph.createHandle(a,["dx1","dy1"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)))),d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))));return new mxPoint(a.x+a.width-b,a.y+d*a.height/2)},function(a,c){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"notch",
this.notch)),a.x+a.width-c.x)))/100;this.state.style.dy1=Math.round(100*Math.max(0,Math.min(1,(c.y-a.y)/a.height*2)))/100})],e=Graph.createHandle(a,["notch"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+b,a.y+a.height/2)},function(a,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.x-a.x)))/100});d.push(e);a=Graph.createHandle(a,
["dx2"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2))));return new mxPoint(a.x+a.width-b,a.y)},function(a,c){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),a.x+a.width-c.x)))/100});d.push(a);return d};
+mxShapeArrows2SharpArrow.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),k=.5*e*
+Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),l=0;0!=e&&(l=h+f*k*2/e);a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-l,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-l,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e-b));return a};
function mxShapeArrows2SharpArrow2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx3=this.dy3=this.dx2=this.dx1=this.dy1=.5;this.notch=0}mxUtils.extend(mxShapeArrows2SharpArrow2,mxActor);
mxShapeArrows2SharpArrow2.prototype.customProperties=[{name:"dx1",dispName:"Arrowhead Arrow Width",type:"float",min:0,defVal:18},{name:"dy1",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.67},{name:"dx2",dispName:"Arrowhead Angle",type:"float",min:0,defVal:18},{name:"dx3",dispName:"Arrowhead Edge X",type:"float",min:0,defVal:27},{name:"dy3",dispName:"Arrowhead Edge Y",type:"float",min:0,max:1,defVal:.15},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0}];
mxShapeArrows2SharpArrow2.prototype.cst={SHARP_ARROW2:"mxgraph.arrows2.sharpArrow2"};
@@ -1490,6 +1500,9 @@ Graph.handleFactory[mxShapeArrows2SharpArrow2.prototype.cst.SHARP_ARROW2]=functi
"notch",this.notch)),a.x+a.width-c.x)))/100;this.state.style.dy1=Math.round(100*Math.max(0,Math.min(1,(c.y-a.y)/a.height*2)))/100})],e=Graph.createHandle(a,["notch"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+b,a.y+a.height/2)},function(a,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.x-a.x)))/100});d.push(e);e=Graph.createHandle(a,
["dx2"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2))));return new mxPoint(a.x+a.width-b,a.y)},function(a,c){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),a.x+a.width-c.x)))/100});d.push(e);a=Graph.createHandle(a,["dx3","dy3"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx3",this.dx3)))),d=Math.max(0,Math.min(1-
parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))/2,parseFloat(mxUtils.getValue(this.state.style,"dy3",this.dy3))));return new mxPoint(a.x+a.width-b,a.y+d*a.height/2)},function(a,c){this.state.style.dx3=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2)),Math.min(a.width,a.x+a.width-c.x)))/100;this.state.style.dy3=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),(c.y-a.y)/a.height*2)))/100});d.push(a);return d};
+mxShapeArrows2SharpArrow2.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy3",this.dy3)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx3",this.dx3)))),k=Math.max(0,
+Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1));parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,k,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-
+h,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-h,e-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e-b));return a};
function mxShapeArrows2CalloutArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2CalloutArrow,mxActor);
mxShapeArrows2CalloutArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:10},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"notch",dispName:"Rectangle Width",type:"float",min:0,defVal:60}];mxShapeArrows2CalloutArrow.prototype.cst={CALLOUT_ARROW:"mxgraph.arrows2.calloutArrow"};
mxShapeArrows2CalloutArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,.5*c-d);a.lineTo(b-
@@ -1498,6 +1511,9 @@ Graph.handleFactory[mxShapeArrows2CalloutArrow.prototype.cst.CALLOUT_ARROW]=func
c){this.state.style.dx=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),a.x+a.width-c.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(a.height/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),a.y+a.height/2-c.y)))/100})],e=Graph.createHandle(a,["notch"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+b,a.y+a.height/
2)},function(a,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),c.x-a.x)))/100});d.push(e);a=Graph.createHandle(a,["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),d=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),e=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",
this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+a.height/2-d-e)},function(a,c){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(a.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),a.y+a.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))-c.y)))/100});d.push(a);return d};
+mxShapeArrows2CalloutArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b+g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,f,.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,e));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,.5*(f+d-c),-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,.5*(f+d-c),b));return a};
function mxShapeArrows2BendArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0;this.arrowHead=40}mxUtils.extend(mxShapeArrows2BendArrow,mxActor);
mxShapeArrows2BendArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:38},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:15},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:55},{name:"rounded",dispName:"Rounded",type:"boolean",defVal:!1}];mxShapeArrows2BendArrow.prototype.cst={BEND_ARROW:"mxgraph.arrows2.bendArrow"};
mxShapeArrows2BendArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),h=mxUtils.getValue(this.style,"rounded","0");a.begin();a.moveTo(b-e,0);
@@ -1506,14 +1522,21 @@ Graph.handleFactory[mxShapeArrows2BendArrow.prototype.cst.BEND_ARROW]=function(a
Math.round(100*Math.max(0,Math.min(a.width-2.2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),a.x+a.width-c.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2,a.y+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2-c.y)))/100})],e=Graph.createHandle(a,["notch"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),
d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),b=Math.max(0,Math.min(a.height-b/2-d,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+d,a.y+a.height-b)},function(a,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(a.height-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),a.y+a.height-c.y)))/100});d.push(e);a=Graph.createHandle(a,
["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+d)},function(a,c){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(a.height,c.y-a.y)))/100});d.push(a);return d};
-function mxShapeArrows2BendDoubleArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0;this.arrowHead=40}mxUtils.extend(mxShapeArrows2BendDoubleArrow,mxActor);
+mxShapeArrows2BendArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),h=mxUtils.getValue(this.style,"rounded","0");a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d-c+2*b),g/2-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,g/2-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,g/2+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+2*b),g/2+b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,2*b,.5*(e-g/2-b)+g/2+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2*b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-g/2-b)+g/2+b));"1"==h?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.586*b,g/2-.414*b)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2*b+.0586*b,g/2+b+.0586*b))):(a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,g/2-b)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2*b,g/2+b)));return a};function mxShapeArrows2BendDoubleArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0;this.arrowHead=40}mxUtils.extend(mxShapeArrows2BendDoubleArrow,mxActor);
mxShapeArrows2BendDoubleArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:38},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:15},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:55},{name:"rounded",dispName:"Rounded",type:"boolean",defVal:!1}];mxShapeArrows2BendDoubleArrow.prototype.cst={BEND_DOUBLE_ARROW:"mxgraph.arrows2.bendDoubleArrow"};
mxShapeArrows2BendDoubleArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),g=mxUtils.getValue(this.style,"rounded","0");a.begin();a.moveTo(b-e,0);a.lineTo(b,.5*f);a.lineTo(b-e,f);a.lineTo(b-e,f/2+d);"1"==g?(a.lineTo(f/2+1.2*
d,f/2+d),a.arcTo(.2*d,.2*d,0,0,0,f/2+d,f/2+1.2*d)):a.lineTo(f/2+d,f/2+d);a.lineTo(f/2+d,c-e);a.lineTo(f,c-e);a.lineTo(f/2,c);a.lineTo(0,c-e);a.lineTo(f/2-d,c-e);"1"==g?(a.lineTo(f/2-d,f/2+d),a.arcTo(2*d,2*d,0,0,1,f/2+d,f/2-d)):a.lineTo(f/2-d,f/2-d);a.lineTo(b-e,f/2-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2BendDoubleArrow.prototype.cst.BEND_DOUBLE_ARROW,mxShapeArrows2BendDoubleArrow);mxShapeArrows2BendDoubleArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2BendDoubleArrow.prototype.cst.BEND_DOUBLE_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(Math.min(a.height,a.width)-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),c=Math.max(0,Math.min(Math.min(a.width,a.height)-b,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,
"dy",this.dy))));return new mxPoint(a.x+a.width-c,a.y+b/2-d)},function(a,b){this.state.style.dx=Math.round(100*Math.max(0,Math.min(Math.min(a.width,a.height)-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),a.x+a.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2,a.y+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2-b.y)))/100})];a=Graph.createHandle(a,
["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(Math.min(a.height,a.width)-b,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+c)},function(a,b){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(Math.min(a.height,a.width)-parseFloat(mxUtils.getValue(this.state.style,"dx",
-this.dx)),b.y-a.y)))/100});d.push(a);return d};function mxShapeArrows2CalloutDoubleArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2CalloutDoubleArrow,mxActor);
+this.dx)),b.y-a.y)))/100});d.push(a);return d};
+mxShapeArrows2BendDoubleArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),g=mxUtils.getValue(this.style,"rounded","0");a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f/2+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f/2+b+d-c),f/2+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f/2+b+d-c),f/2-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2+b,.5*(f/2+b+e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2-b,.5*(f/2+b+e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,f/2+b,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2-b,e-c));"1"==g?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2-.414*b,f/2-.414*b)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2+b+.0586*b,f/2+b+.0586*b))):(a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,f/2-b,f/2-b)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2+b,f/2+b)));return a};function mxShapeArrows2CalloutDoubleArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2CalloutDoubleArrow,mxActor);
mxShapeArrows2CalloutDoubleArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:10},{name:"notch",dispName:"Rect Size",type:"float",min:0,defVal:24}];mxShapeArrows2CalloutDoubleArrow.prototype.cst={CALLOUT_DOUBLE_ARROW:"mxgraph.arrows2.calloutDoubleArrow"};
mxShapeArrows2CalloutDoubleArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(b/2-f,0);a.lineTo(b/2+f,0);a.lineTo(b/2+f,
.5*c-d);a.lineTo(b-e,.5*c-d);a.lineTo(b-e,.5*c-d-g);a.lineTo(b,.5*c);a.lineTo(b-e,.5*c+d+g);a.lineTo(b-e,.5*c+d);a.lineTo(b/2+f,.5*c+d);a.lineTo(b/2+f,c);a.lineTo(b/2-f,c);a.lineTo(b/2-f,.5*c+d);a.lineTo(e,.5*c+d);a.lineTo(e,.5*c+d+g);a.lineTo(0,.5*c);a.lineTo(e,.5*c-d-g);a.lineTo(e,.5*c-d);a.lineTo(b/2-f,.5*c-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2CalloutDoubleArrow.prototype.cst.CALLOUT_DOUBLE_ARROW,mxShapeArrows2CalloutDoubleArrow);
@@ -1522,6 +1545,9 @@ Graph.handleFactory[mxShapeArrows2CalloutDoubleArrow.prototype.cst.CALLOUT_DOUBL
2-b)},function(a,c){this.state.style.dx=Math.round(100*Math.max(0,Math.min(a.width/2-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),a.x+a.width-c.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(a.height/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),a.y+a.height/2-c.y)))/100})],e=Graph.createHandle(a,["notch"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+
a.width/2+b,a.y+a.height/2)},function(a,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(a.width/2-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),c.x-a.x-a.width/2)))/100});d.push(e);a=Graph.createHandle(a,["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),d=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),e=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,
"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+a.height/2-d-e)},function(a,c){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(a.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),a.y+a.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))-c.y)))/100});d.push(a);return d};
+mxShapeArrows2CalloutDoubleArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d/2-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d/2+f,0));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,d/2-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,d/2+f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b-g));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d-c,.5*e+b+g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e-b-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e+b+g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(1.5*d-c+f),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(1.5*d-c+f),.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(.5*d+c-f),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(.5*d+c-f),.5*e+b));return a};
function mxShapeArrows2CalloutQuadArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2CalloutQuadArrow,mxActor);
mxShapeArrows2CalloutQuadArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"notch",dispName:"Rect Size",type:"float",min:0,defVal:24},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:10}];mxShapeArrows2CalloutQuadArrow.prototype.cst={CALLOUT_QUAD_ARROW:"mxgraph.arrows2.calloutQuadArrow"};
mxShapeArrows2CalloutQuadArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(.5*b+d,.5*c-f);a.lineTo(.5*b+f,.5*c-f);a.lineTo(.5*
@@ -1531,7 +1557,12 @@ Graph.handleFactory[mxShapeArrows2CalloutQuadArrow.prototype.cst.CALLOUT_QUAD_AR
Math.max(0,Math.min(Math.min(a.width,a.height)/2-Math.max(parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))),a.x+a.width-c.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),a.y+a.height/2-c.y)))/100})],e=Graph.createHandle(a,["notch"],function(a){var b=Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(Math.min(a.width,
a.height),parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+a.width/2+b,a.y+a.height/2)},function(a,c){this.state.style.notch=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(Math.min(a.width,a.height)/2-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),c.x-a.x-a.width/2)))/100});d.push(e);a=Graph.createHandle(a,["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,
"dx",this.dx)))),d=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),e=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+a.height/2-d-e)},function(a,c){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(a.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),a.y+a.height/2-c.y)))/100});d.push(a);return d};
-function mxShapeArrows2CalloutDouble90Arrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx1=this.dy1=.5;this.arrowHead=this.dy2=this.dx2=0}mxUtils.extend(mxShapeArrows2CalloutDouble90Arrow,mxActor);
+mxShapeArrows2CalloutQuadArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+f,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+f,.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+f,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*d+f,.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-f,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-f,.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-f,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-f,.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d-c,.5*e-b-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b+g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b-g,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b+g,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e-b-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e+b+g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b-g,c));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*d+b+g,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.5*(f-c),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.5*(f-c),.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.75*e+.5*(f-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.75*e+.5*(f-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.5*(f-c),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*
+d-.5*(f-c),.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.25*e-.5*(f-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.25*e-.5*(f-c)));return a};function mxShapeArrows2CalloutDouble90Arrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx1=this.dy1=.5;this.arrowHead=this.dy2=this.dx2=0}mxUtils.extend(mxShapeArrows2CalloutDouble90Arrow,mxActor);
mxShapeArrows2CalloutDouble90Arrow.prototype.customProperties=[{name:"dx1",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy1",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"dx2",dispName:"Callout Width",type:"float",min:0,defVal:70},{name:"dy2",dispName:"Callout Height",type:"float",min:0,defVal:70},{name:"arrowHead",dispName:"ArrowHead Width",type:"float",min:0,defVal:10}];mxShapeArrows2CalloutDouble90Arrow.prototype.cst={CALLOUT_DOUBLE_90_ARROW:"mxgraph.arrows2.calloutDouble90Arrow"};
mxShapeArrows2CalloutDouble90Arrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),h=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",
this.arrowHead))));a.begin();a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,.5*g-d);a.lineTo(b-e,.5*g-d);a.lineTo(b-e,.5*g-d-h);a.lineTo(b,.5*g);a.lineTo(b-e,.5*g+d+h);a.lineTo(b-e,.5*g+d);a.lineTo(f,.5*g+d);a.lineTo(f,g);a.lineTo(f/2+d,g);a.lineTo(f/2+d,c-e);a.lineTo(f/2+d+h,c-e);a.lineTo(f/2,c);a.lineTo(f/2-d-h,c-e);a.lineTo(f/2-d,c-e);a.lineTo(f/2-d,g);a.lineTo(0,g);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2CalloutDouble90Arrow.prototype.cst.CALLOUT_DOUBLE_90_ARROW,mxShapeArrows2CalloutDouble90Arrow);
@@ -1542,22 +1573,33 @@ Graph.handleFactory[mxShapeArrows2CalloutDouble90Arrow.prototype.cst.CALLOUT_DOU
this.dx2)))),d=Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),Math.min(a.height-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))));return new mxPoint(a.x+b,a.y+d)},function(a,c){this.state.style.dx2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))+parseFloat(mxUtils.getValue(this.state.style,
"arrowHead",this.arrowHead)),Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.x-a.x)))/100;this.state.style.dy2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),Math.min(a.height-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.y-a.y)))/100});d.push(e);a=Graph.createHandle(a,["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,
"dx1",this.dx1)))),d=Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)))),e=Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2-d-e)},function(a,c){this.state.style.arrowHead=Math.round(100*Math.max(0,
-Math.min(parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),a.y+parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))-c.y)))/100});d.push(a);return d};function mxShapeArrows2QuadArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}
-mxUtils.extend(mxShapeArrows2QuadArrow,mxActor);mxShapeArrows2QuadArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:10}];mxShapeArrows2QuadArrow.prototype.cst={QUAD_ARROW:"mxgraph.arrows2.quadArrow"};
+Math.min(parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),a.y+parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))-c.y)))/100});d.push(a);return d};
+mxShapeArrows2CalloutDouble90Arrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),h=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));
+a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+f),.5*g-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*g-b-h));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*g+b+h));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d-c+f),.5*g+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f+b,.5*(e-c+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f-b,.5*(e-c+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2+b+h,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2-b-h,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,g));return a};function mxShapeArrows2QuadArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2QuadArrow,mxActor);
+mxShapeArrows2QuadArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:10}];mxShapeArrows2QuadArrow.prototype.cst={QUAD_ARROW:"mxgraph.arrows2.quadArrow"};
mxShapeArrows2QuadArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(.5*b+d,.5*c-d);a.lineTo(b-e,.5*c-d);a.lineTo(b-e,.5*c-d-f);a.lineTo(b,.5*c);a.lineTo(b-e,.5*c+d+f);a.lineTo(b-e,.5*c+d);a.lineTo(.5*b+d,
.5*c+d);a.lineTo(.5*b+d,c-e);a.lineTo(.5*b+d+f,c-e);a.lineTo(.5*b,c);a.lineTo(.5*b-d-f,c-e);a.lineTo(.5*b-d,c-e);a.lineTo(.5*b-d,.5*c+d);a.lineTo(e,.5*c+d);a.lineTo(e,.5*c+d+f);a.lineTo(0,.5*c);a.lineTo(e,.5*c-d-f);a.lineTo(e,.5*c-d);a.lineTo(.5*b-d,.5*c-d);a.lineTo(.5*b-d,e);a.lineTo(.5*b-d-f,e);a.lineTo(.5*b,0);a.lineTo(.5*b+d+f,e);a.lineTo(.5*b+d,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2QuadArrow.prototype.cst.QUAD_ARROW,mxShapeArrows2QuadArrow);
mxShapeArrows2QuadArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2QuadArrow.prototype.cst.QUAD_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(a){parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead));var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+a.width-b,a.y+a.height/2-c)},function(a,b){this.state.style.dx=Math.round(100*Math.max(0,
Math.min(Math.min(a.width,a.height)/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),a.x+a.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(a.height/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),a.y+a.height/2-b.y)))/100})];a=Graph.createHandle(a,["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),
c=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),d=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+a.height/2-c-d)},function(a,b){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(a.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),a.y+a.height/2-b.y)))/100});d.push(a);return d};
-function mxShapeArrows2TriadArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=0}mxUtils.extend(mxShapeArrows2TriadArrow,mxActor);mxShapeArrows2TriadArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:40}];
-mxShapeArrows2TriadArrow.prototype.cst={TRIAD_ARROW:"mxgraph.arrows2.triadArrow"};
+mxShapeArrows2QuadArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e-b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e+b+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b-f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b+f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+.5*d-b-f,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b+f,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.5*(c-b)+.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.5*(c-b)+.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.5*(b-c)+.75*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.5*(b-c)+.75*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b)+.25*d,.5*e-b));
+a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b)+.25*d,.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c)+.75*d,.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c)+.75*d,.5*e+b));return a};function mxShapeArrows2TriadArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=0}mxUtils.extend(mxShapeArrows2TriadArrow,mxActor);
+mxShapeArrows2TriadArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:40}];mxShapeArrows2TriadArrow.prototype.cst={TRIAD_ARROW:"mxgraph.arrows2.triadArrow"};
mxShapeArrows2TriadArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(.5*b+.5*f-d,c-f+d);a.lineTo(b-e,c-f+d);a.lineTo(b-e,c-f);a.lineTo(b,c-.5*f);a.lineTo(b-e,c);a.lineTo(b-e,c-d);a.lineTo(e,c-d);a.lineTo(e,
c);a.lineTo(0,c-.5*f);a.lineTo(e,c-f);a.lineTo(e,c-f+d);a.lineTo(.5*b-.5*f+d,c-f+d);a.lineTo(.5*b-.5*f+d,e);a.lineTo(.5*b-.5*f,e);a.lineTo(.5*b,0);a.lineTo(.5*b+.5*f,e);a.lineTo(.5*b+.5*f-d,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2TriadArrow.prototype.cst.TRIAD_ARROW,mxShapeArrows2TriadArrow);mxShapeArrows2TriadArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2TriadArrow.prototype.cst.TRIAD_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),c=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+a.width-c,a.y+a.height-b)},function(a,b){this.state.style.dx=
Math.round(100*Math.max(0,Math.min(Math.min(a.height-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),a.width/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2),a.x+a.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2,a.y+a.height-b.y)))/100})];a=Graph.createHandle(a,["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,
"dx",this.dx))));parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy));var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+a.height-c)},function(a,b){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(a.height-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),a.width-2*parseFloat(mxUtils.getValue(this.state.style,"dx",
-this.dx)),a.y+a.height-b.y)))/100});d.push(a);return d};function mxShapeArrows2TailedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2TailedArrow,mxActor);
+this.dx)),a.y+a.height-b.y)))/100});d.push(a);return d};
+mxShapeArrows2TriadArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,.5*-f,c));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*d,e-b));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,.5*f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(1.5*d-c+.5*f-b),e-f+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(1.5*d-c+.5*f-b),e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(.5*d+c-.5*f+b),e-f+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(.5*d+c-.5*f+b),e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-.5*f+b,.5*(c+e-f+b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+.5*f-b,.5*(c+e-f+b)));return a};
+function mxShapeArrows2TailedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2TailedArrow,mxActor);
mxShapeArrows2TailedArrow.prototype.customProperties=[{name:"dx1",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy1",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"dx2",dispName:"Tail Length",type:"float",min:0,defVal:25},{name:"dy2",dispName:"Tail Width",type:"float",min:0,defVal:30},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:20}];mxShapeArrows2TailedArrow.prototype.cst={TAILED_ARROW:"mxgraph.arrows2.tailedArrow"};
mxShapeArrows2TailedArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),h=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),
k=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),l=0;0!=f&&(l=g+f*(f-d)/f);a.begin();a.moveTo(0,.5*c-f);a.lineTo(g,.5*c-f);a.lineTo(l,.5*c-d);a.lineTo(b-e,.5*c-d);a.lineTo(b-e,.5*c-d-k);a.lineTo(b,.5*c);a.lineTo(b-e,.5*c+d+k);a.lineTo(b-e,.5*c+d);a.lineTo(l,.5*c+d);a.lineTo(g,.5*c+f);a.lineTo(0,.5*c+f);a.lineTo(h,.5*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2TailedArrow.prototype.cst.TAILED_ARROW,mxShapeArrows2TailedArrow);
@@ -1567,7 +1609,11 @@ c){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mx
Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+b,a.y+a.height/2)},function(a,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2)),c.x-a.x)))/100});d.push(e);e=Graph.createHandle(a,["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx1",
this.dx1)))),d=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)))),e=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+a.height/2-d-e)},function(a,c){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(a.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),a.y+a.height/2-c.y)))/100});d.push(e);a=Graph.createHandle(a,["dx2","dy2"],function(a){var b=
Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2)))),d=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))));return new mxPoint(a.x+b,a.y+a.height/2-d)},function(a,c){this.state.style.dx2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1))-parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))+parseFloat(mxUtils.getValue(this.state.style,
-"dy1",this.dy1))-1,c.x-a.x)))/100;this.state.style.dy2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),Math.min(a.height/2,a.y+a.height/2-c.y)))/100});d.push(a);return d};function mxShapeArrows2TailedNotchedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2TailedNotchedArrow,mxActor);
+"dy1",this.dy1))-1,c.x-a.x)))/100;this.state.style.dy2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),Math.min(a.height/2,a.y+a.height/2-c.y)))/100});d.push(a);return d};
+mxShapeArrows2TailedArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),k=Math.max(0,
+Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),l=0;0!=f&&(l=g+f*(f-b)/f);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+l),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b-k));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+l),.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b+k));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};function mxShapeArrows2TailedNotchedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}
+mxUtils.extend(mxShapeArrows2TailedNotchedArrow,mxActor);
mxShapeArrows2TailedNotchedArrow.prototype.customProperties=[{name:"dx1",dispName:"Arrowhead Length",type:"float",mix:0,defVal:20},{name:"dy1",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"dx2",dispName:"Tail Length",type:"float",min:0,defVal:25},{name:"dy2",dispName:"Tail Width",type:"float",min:0,defVal:30},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:20},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:20}];
mxShapeArrows2TailedNotchedArrow.prototype.cst={TAILED_NOTCHED_ARROW:"mxgraph.arrows2.tailedNotchedArrow"};
mxShapeArrows2TailedNotchedArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),h=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),
@@ -1578,26 +1624,36 @@ Graph.handleFactory[mxShapeArrows2TailedNotchedArrow.prototype.cst.TAILED_NOTCHE
Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+b,a.y+a.height/2)},function(a,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.x-a.x)))/100});d.push(e);e=Graph.createHandle(a,["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)))),d=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,
"dy1",this.dy1)))),e=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+a.height/2-d-e)},function(a,c){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(a.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),a.y+a.height/2-c.y)))/100});d.push(e);a=Graph.createHandle(a,["dx2","dy2"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx2",
this.dx2)))),d=Math.max(0,Math.min(a.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))));return new mxPoint(a.x+b,a.y+a.height/2-d)},function(a,c){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.x-a.x)))/100;this.state.style.dy2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),Math.min(a.height/2,
-a.y+a.height/2-c.y)))/100});d.push(a);return d};function mxShapeArrows2StripedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0}mxUtils.extend(mxShapeArrows2StripedArrow,mxActor);
-mxShapeArrows2StripedArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:40},{name:"dy",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.6},{name:"notch",dispName:"Stripes Length",type:"float",min:0,defVal:25}];mxShapeArrows2StripedArrow.prototype.cst={STRIPED_ARROW:"mxgraph.arrows2.stripedArrow"};
+a.y+a.height/2-c.y)))/100});d.push(a);return d};
+mxShapeArrows2TailedNotchedArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),k=Math.max(0,
+Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),l=0;0!=f&&(l=g+h*(f-b)/f);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+l),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b-k));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+l),.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b+k));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};function mxShapeArrows2StripedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0}
+mxUtils.extend(mxShapeArrows2StripedArrow,mxActor);mxShapeArrows2StripedArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:40},{name:"dy",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.6},{name:"notch",dispName:"Stripes Length",type:"float",min:0,defVal:25}];mxShapeArrows2StripedArrow.prototype.cst={STRIPED_ARROW:"mxgraph.arrows2.stripedArrow"};
mxShapeArrows2StripedArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.begin();a.moveTo(f,d);a.lineTo(b-e,d);a.lineTo(b-e,0);a.lineTo(b,.5*c);a.lineTo(b-e,c);a.lineTo(b-e,c-d);a.lineTo(f,c-d);a.close();a.moveTo(0,c-d);a.lineTo(.16*
f,c-d);a.lineTo(.16*f,d);a.lineTo(0,d);a.close();a.moveTo(.32*f,c-d);a.lineTo(.8*f,c-d);a.lineTo(.8*f,d);a.lineTo(.32*f,d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2StripedArrow.prototype.cst.STRIPED_ARROW,mxShapeArrows2StripedArrow);mxShapeArrows2StripedArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2StripedArrow.prototype.cst.STRIPED_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+a.width-b,a.y+c*a.height/2)},function(a,b){this.state.style.dx=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"notch",
this.notch)),a.x+a.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(1,(b.y-a.y)/a.height*2)))/100})];a=Graph.createHandle(a,["notch"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(a.x+b,a.y+a.height/2)},function(a,b){this.state.style.notch=Math.round(100*Math.max(0,Math.min(a.width-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),b.x-a.x)))/100});d.push(a);return d};
+mxShapeArrows2StripedArrow.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));parseFloat(mxUtils.getValue(this.style,"notch",this.notch));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,0,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e-b));return a};
function mxShapeArrows2JumpInArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=40}mxUtils.extend(mxShapeArrows2JumpInArrow,mxActor);mxShapeArrows2JumpInArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:38},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:15},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:55}];
mxShapeArrows2JumpInArrow.prototype.cst={JUMP_IN_ARROW:"mxgraph.arrows2.jumpInArrow"};
mxShapeArrows2JumpInArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(b-e,0);a.lineTo(b,.5*f);a.lineTo(b-e,f);a.lineTo(b-e,f/2+d);a.arcTo(b-e,c-f/2-d,0,0,0,0,c);a.arcTo(b-e,c-f/2+d,0,0,1,b-e,f/2-d);a.close();
a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2JumpInArrow.prototype.cst.JUMP_IN_ARROW,mxShapeArrows2JumpInArrow);mxShapeArrows2JumpInArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2JumpInArrow.prototype.cst.JUMP_IN_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),c=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+a.width-c,a.y+b/2-d)},function(a,b){this.state.style.dx=
Math.round(100*Math.max(0,Math.min(a.width,a.x+a.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2,a.y+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2-b.y)))/100})];a=Graph.createHandle(a,["arrowHead"],function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
-"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+c)},function(a,b){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(a.height,b.y-a.y)))/100});d.push(a);return d};function mxShapeArrows2UTurnArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=40}mxUtils.extend(mxShapeArrows2UTurnArrow,mxActor);
-mxShapeArrows2UTurnArrow.prototype.customProperties=[{name:"dx2",dispName:"Arrowhead Length",type:"float",min:0,defVal:25},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:11},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:43}];mxShapeArrows2UTurnArrow.prototype.cst={U_TURN_ARROW:"mxgraph.arrows2.uTurnArrow"};
+"arrowHead",this.arrowHead))));return new mxPoint(a.x+a.width-b,a.y+c)},function(a,b){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(a.height,b.y-a.y)))/100});d.push(a);return d};
+mxShapeArrows2JumpInArrow.prototype.getConstraints=function(a,d,e){a=[];parseFloat(mxUtils.getValue(this.style,"dy",this.dy));var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d-b,e));return a};function mxShapeArrows2UTurnArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=40}mxUtils.extend(mxShapeArrows2UTurnArrow,mxActor);mxShapeArrows2UTurnArrow.prototype.customProperties=[{name:"dx2",dispName:"Arrowhead Length",type:"float",min:0,defVal:25},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:11},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:43}];
+mxShapeArrows2UTurnArrow.prototype.cst={U_TURN_ARROW:"mxgraph.arrows2.uTurnArrow"};
mxShapeArrows2UTurnArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));var f=(c-e/2+d)/2,g=Math.max(0,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)));a.begin();a.moveTo(f,0);a.lineTo(f+g,.5*e);a.lineTo(f,e);a.lineTo(f,e/2+d);a.arcTo(f-2*d,f-2*d,0,0,0,f,c-2*d);a.lineTo(Math.max(b,f),c-2*d);a.lineTo(Math.max(b,
f),c);a.lineTo(f,c);a.arcTo(f,f,0,0,1,f,e/2-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2UTurnArrow.prototype.cst.U_TURN_ARROW,mxShapeArrows2UTurnArrow);mxShapeArrows2UTurnArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2UTurnArrow.prototype.cst.U_TURN_ARROW]=function(a){var d=[Graph.createHandle(a,["dy"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+(a.height-b/2+d)/2,a.y+b/2-d)},function(a,c){this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"arrowHead",
this.arrowHead))/2,a.y+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2-c.y)))/100})],e=Graph.createHandle(a,["dx2"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),d=(a.height-b/2+d)/2,e=Math.max(0,Math.min(a.width-d,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2))));return new mxPoint(a.x+d+e,a.y+
b/2)},function(a,c){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),b=(a.height-b/2+d)/2;this.state.style.dx2=Math.round(100*Math.max(0,Math.min(Math.max(a.width,b),c.x-a.x-b)))/100});d.push(e);a=Graph.createHandle(a,["arrowHead"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),
-d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+(a.height-b/2+d)/2,a.y+b)},function(a,c){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(a.height/2,c.y-a.y)))/100});d.push(a);return d};function mxAtlassianJiraIssue(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxAtlassianJiraIssue,mxRectangleShape);
+d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(a.x+(a.height-b/2+d)/2,a.y+b)},function(a,c){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(a.height/2,c.y-a.y)))/100});d.push(a);return d};
+mxShapeArrows2UTurnArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),f=(e-c/2+b)/2,g=Math.max(0,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f+g,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d),e-2*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,Math.max(d,f),e-2*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,Math.max(d,f),e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,Math.max(d,f),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(e+.5*c-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-2*b,.5*(e+.5*c-b)));return a};function mxAtlassianJiraIssue(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxAtlassianJiraIssue,mxRectangleShape);
mxAtlassianJiraIssue.prototype.customProperties=[{name:"issueType",dispName:"Issue Type",type:"enum",enumList:[{val:"story",dispName:"Story"},{val:"task",dispName:"Task"},{val:"subTask",dispName:"Sub-Task"},{val:"feature",dispName:"Feature"},{val:"bug",dispName:"Bug"},{val:"techTask",dispName:"Tech Task"},{val:"epic",dispName:"Epic"},{val:"improvement",dispName:"Improvement"},{val:"fault",dispName:"Fault"},{val:"change",dispName:"Change"},{val:"access",dispName:"Access"},{val:"purchase",dispName:"Purchase"},
{val:"itHelp",dispName:"IT Help"}]},{name:"issuePriority",dispName:"Issue Priority",type:"enum",enumList:[{val:"blocker",dispName:"Blocker"},{val:"critical",dispName:"Critical"},{val:"major",dispName:"Major"},{val:"minor",dispName:"Minor"},{val:"trivial",dispName:"Trivial"}]},{name:"issueStatus",dispName:"Issue Status",type:"enum",enumList:[{val:"todo",dispName:"TODO"},{val:"inProgress",dispName:"In Progress"},{val:"inReview",dispName:"In Review"},{val:"done",dispName:"Done"}]}];
mxAtlassianJiraIssue.prototype.cst={ISSUE:"mxgraph.atlassian.issue"};
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 6a81a5b8..8e3a6e66 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -1997,12 +1997,12 @@ a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.backg
Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,f){b.undoableEditHappened(f.getProperty("edit"))};var f=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(b,f){var d=a.getSelectionCellsForChanges(f.getProperty("edit").changes);a.getModel();for(var k=[],r=0;r<d.length;r++)null!=a.view.getState(d[r])&&k.push(d[r]);a.setSelectionCells(k)};
b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};
OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,f,d,k,n,q,r,u,c){var g=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(g=80);f+=g;d+=g;var h=f,l=d,p=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),m=Math.max(1,Math.round((document.body.clientWidth-f-64)/2)),t=Math.max(1,Math.round((p-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-
-64);d=Math.min(d,p-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=p+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var x=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=x.x+"px";this.bg.style.top=x.y+"px";m+=x.x;t+=x.y;
-k&&document.body.appendChild(this.bg);var w=a.createDiv(u?"geTransDialog":"geDialog");k=this.getPosition(m,t,f,d);m=k.x;t=k.y;w.style.width=f+"px";w.style.height=d+"px";w.style.left=m+"px";w.style.top=t+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!r&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",
-n.style.top=t+14+"px",n.style.left=m+f+38-g+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=n,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=c){var x=c();null!=x&&(h=f=x.w,l=d=x.h)}p=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=p+"px";
-m=Math.max(1,Math.round((document.body.clientWidth-f-64)/2));t=Math.max(1,Math.round((p-d-a.footerHeight)/3));f=Math.min(h,document.body.scrollWidth-64);d=Math.min(l,p-64);x=this.getPosition(m,t,f,d);m=x.x;t=x.y;w.style.left=m+"px";w.style.top=t+"px";w.style.width=f+"px";w.style.height=d+"px";!r&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=t+14+"px",this.dialogImg.style.left=m+f+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);
-this.onDialogClose=q;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,b,f,d,k,n,p,r,u,c){var g=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(g=80);f+=g;d+=g;var h=f,l=d,t=0<document.documentElement.clientHeight?document.documentElement.clientHeight:Math.max(document.body.clientHeight||0,document.documentElement.clientHeight),m=Math.max(1,Math.round((document.body.clientWidth-f-64)/2)),q=Math.max(1,Math.round((t-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-
+64);d=Math.min(d,t-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=t+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var x=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=x.x+"px";this.bg.style.top=x.y+"px";m+=x.x;q+=x.y;
+k&&document.body.appendChild(this.bg);var w=a.createDiv(u?"geTransDialog":"geDialog");k=this.getPosition(m,q,f,d);m=k.x;q=k.y;w.style.width=f+"px";w.style.height=d+"px";w.style.left=m+"px";w.style.top=q+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!r&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",
+n.style.top=q+14+"px",n.style.left=m+f+38-g+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=n,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=c){var x=c();null!=x&&(h=f=x.w,l=d=x.h)}t=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=t+"px";
+m=Math.max(1,Math.round((document.body.clientWidth-f-64)/2));q=Math.max(1,Math.round((t-d-a.footerHeight)/3));f=Math.min(h,document.body.scrollWidth-64);d=Math.min(l,t-64);x=this.getPosition(m,q,f,d);m=x.x;q=x.y;w.style.left=m+"px";w.style.top=q+"px";w.style.width=f+"px";w.style.height=d+"px";!r&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=q+14+"px",this.dialogImg.style.left=m+f+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);
+this.onDialogClose=p;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -2012,29 +2012,29 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var b=r.checked||c.checked,d=parseInt(h.value)/100;isNaN(d)&&(d=1,h.value="100%");var d=.75*d,l=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,p=1/f.pageScale;if(b){var k=r.checked?1:parseInt(g.value);isNaN(k)||(p=mxUtils.getScaleForPageCount(k,f,l))}f.getGraphBounds();var y=k=0,l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*d);l.height=Math.ceil(l.height*d);p*=d;!b&&f.pageVisible?(d=f.getPageLayout(),k-=d.x*l.width,y-=d.y*l.height):
-b=!0;b=PrintDialog.createPrintPreview(f,p,l,0,k,y,b);b.open();a&&PrintDialog.printPreview(b)}var f=a.editor.graph,d,k,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var r=document.createElement("input");r.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(r);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
-k.appendChild(u);mxEvent.addListener(u,"click",function(a){r.checked=!r.checked;c.checked=!r.checked;mxEvent.consume(a)});mxEvent.addListener(r,"change",function(){c.checked=!r.checked});d.appendChild(k);q.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");k.appendChild(u);mxEvent.addListener(u,
-"click",function(a){c.checked=!c.checked;r.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);q.appendChild(d);mxEvent.addListener(c,"change",
-function(){c.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");r.checked=!c.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var h=document.createElement("input");h.setAttribute("value","100 %");h.setAttribute("size","5");h.style.width="50px";k.appendChild(h);d.appendChild(k);q.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
+PrintDialog.prototype.create=function(a){function b(a){var b=r.checked||c.checked,d=parseInt(h.value)/100;isNaN(d)&&(d=1,h.value="100%");var d=.75*d,l=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,t=1/f.pageScale;if(b){var k=r.checked?1:parseInt(g.value);isNaN(k)||(t=mxUtils.getScaleForPageCount(k,f,l))}f.getGraphBounds();var y=k=0,l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*d);l.height=Math.ceil(l.height*d);t*=d;!b&&f.pageVisible?(d=f.getPageLayout(),k-=d.x*l.width,y-=d.y*l.height):
+b=!0;b=PrintDialog.createPrintPreview(f,t,l,0,k,y,b);b.open();a&&PrintDialog.printPreview(b)}var f=a.editor.graph,d,k,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var r=document.createElement("input");r.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(r);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+k.appendChild(u);mxEvent.addListener(u,"click",function(a){r.checked=!r.checked;c.checked=!r.checked;mxEvent.consume(a)});mxEvent.addListener(r,"change",function(){c.checked=!r.checked});d.appendChild(k);p.appendChild(d);d=d.cloneNode(!1);var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");k.appendChild(u);mxEvent.addListener(u,
+"click",function(a){c.checked=!c.checked;r.checked=!c.checked;mxEvent.consume(a)});d.appendChild(k);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);p.appendChild(d);mxEvent.addListener(c,"change",
+function(){c.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");r.checked=!c.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var h=document.createElement("input");h.setAttribute("value","100 %");h.setAttribute("size","5");h.style.width="50px";k.appendChild(h);d.appendChild(k);p.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
k.style.paddingTop="20px";k.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&k.appendChild(u);if(PrintDialog.previewEnabled){var l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});l.className="geBtn";k.appendChild(l)}l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});l.className="geBtn gePrimaryBtn";k.appendChild(l);a.editor.cancelFirst||
-k.appendChild(u);d.appendChild(k);q.appendChild(d);n.appendChild(q);this.container=n};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
-PrintDialog.createPrintPreview=function(a,b,f,d,k,n,q){b=new mxPrintPreview(a,b,f,d,k,n);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var r=b.writeHead;b.writeHead=function(a){r.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+k.appendChild(u);d.appendChild(k);p.appendChild(d);n.appendChild(p);this.container=n};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
+PrintDialog.createPrintPreview=function(a,b,f,d,k,n,p){b=new mxPrintPreview(a,b,f,d,k,n);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var r=b.writeHead;b.writeHead=function(a){r.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=g,c.style.backgroundImage="")}function f(){null==p?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxResources.get("change")+"..."):(l.setAttribute("title",p.src),l.style.fontSize="11px",l.innerHTML=p.src.substring(0,42)+"...")}var d=a.editor.graph,k,n,q=document.createElement("table");q.style.width=
-"100%";q.style.height="100%";var r=document.createElement("tbody");k=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);r.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
+var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(c.style.backgroundColor="",c.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(c.style.backgroundColor=g,c.style.backgroundImage="")}function f(){null==t?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxResources.get("change")+"..."):(l.setAttribute("title",t.src),l.style.fontSize="11px",l.innerHTML=t.src.substring(0,42)+"...")}var d=a.editor.graph,k,n,p=document.createElement("table");p.style.width=
+"100%";p.style.height="100%";var r=document.createElement("tbody");k=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);r.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var c=document.createElement("button");c.style.width="18px";c.style.height="18px";c.style.marginRight="20px";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";var g=d.background;b();mxEvent.addListener(c,"click",function(c){a.pickColor(g||"none",function(a){g=a;b()});mxEvent.consume(c)});
n.appendChild(c);mxUtils.write(n,mxResources.get("gridSize")+":");var h=document.createElement("input");h.setAttribute("type","number");h.setAttribute("min","0");h.style.width="40px";h.style.marginLeft="6px";h.value=d.getGridSize();n.appendChild(h);mxEvent.addListener(h,"change",function(){var a=parseInt(h.value);h.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(n);r.appendChild(k);k=document.createElement("tr");n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+
-":");k.appendChild(n);n=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var p=d.backgroundImage;mxEvent.addListener(l,"click",function(c){a.showBackgroundImageDialog(function(a){p=a;f()});mxEvent.consume(c)});f();n.appendChild(l);k.appendChild(n);r.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");var m=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&n.appendChild(m);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==h.value&&d.setGridSize(parseInt(h.value));var c=new ChangePageSetup(a,g,p,u.get());c.ignoreColor=d.background==g;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=p?p.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
-c.ignoreColor&&c.ignoreImage||d.model.execute(c)});t.className="geBtn gePrimaryBtn";n.appendChild(t);a.editor.cancelFirst||n.appendChild(m);k.appendChild(n);r.appendChild(k);q.appendChild(r);this.container=q};
-PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function k(a,c,b){if(b||h!=document.activeElement&&l!=document.activeElement){a=!1;for(c=0;c<m.length;c++)b=m[c],D?"custom"==b.key&&(r.value=b.key,D=!1):null!=b.format&&("a4"==b.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==b.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==b.format.width&&
-f.height==b.format.height?(r.value=b.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):f.width==b.format.height&&f.height==b.format.width&&(r.value=b.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(u.style.display="",g.style.display="none"):(h.value=f.width/100,l.value=f.height/100,n.setAttribute("checked","checked"),
-r.value="custom",u.style.display="none",g.style.display="")}}b="format-"+b;var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var r=document.createElement("select");r.style.marginBottom="8px";r.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
-u.style.height="24px";n.style.marginRight="6px";u.appendChild(n);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";u.appendChild(q);var c=document.createElement("span");c.style.width="100px";mxUtils.write(c,mxResources.get("landscape"));u.appendChild(c);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";var h=document.createElement("input");
-h.setAttribute("size","7");h.style.textAlign="right";g.appendChild(h);mxUtils.write(g," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";g.appendChild(l);mxUtils.write(g," in");u.style.display="none";g.style.display="none";for(var p={},m=PageSetupDialog.getFormats(),t=0;t<m.length;t++){var x=m[t];p[x.key]=x;var w=document.createElement("option");w.setAttribute("value",x.key);mxUtils.write(w,x.title);r.appendChild(w)}var D=!1;k();a.appendChild(r);mxUtils.br(a);
-a.appendChild(u);a.appendChild(g);var y=f,v=function(a,c){var b=p[r.value];null!=b.format?(h.value=b.format.width/100,l.value=b.format.height/100,g.style.display="none",u.style.display=""):(u.style.display="none",g.style.display="");b=parseFloat(h.value);if(isNaN(b)||0>=b)h.value=f.width/100;b=parseFloat(l.value);if(isNaN(b)||0>=b)l.value=f.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(h.value)),Math.floor(100*parseFloat(l.value)));"custom"!=r.value&&q.checked&&(b=new mxRectangle(0,0,
-b.height,b.width));c&&D||b.width==y.width&&b.height==y.height||(y=b,null!=d&&d(y))};mxEvent.addListener(b,"click",function(a){n.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){q.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(h,"blur",v);mxEvent.addListener(h,"click",v);mxEvent.addListener(l,"blur",v);mxEvent.addListener(l,"click",v);mxEvent.addListener(q,"change",v);mxEvent.addListener(n,"change",v);mxEvent.addListener(r,"change",function(a){D="custom"==r.value;
+":");k.appendChild(n);n=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var t=d.backgroundImage;mxEvent.addListener(l,"click",function(c){a.showBackgroundImageDialog(function(a){t=a;f()});mxEvent.consume(c)});f();n.appendChild(l);k.appendChild(n);r.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");var m=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&n.appendChild(m);var q=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==h.value&&d.setGridSize(parseInt(h.value));var c=new ChangePageSetup(a,g,t,u.get());c.ignoreColor=d.background==g;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=t?t.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&&
+c.ignoreColor&&c.ignoreImage||d.model.execute(c)});q.className="geBtn gePrimaryBtn";n.appendChild(q);a.editor.cancelFirst||n.appendChild(m);k.appendChild(n);r.appendChild(k);p.appendChild(r);this.container=p};
+PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function k(a,c,b){if(b||h!=document.activeElement&&l!=document.activeElement){a=!1;for(c=0;c<m.length;c++)b=m[c],E?"custom"==b.key&&(r.value=b.key,E=!1):null!=b.format&&("a4"==b.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==b.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==b.format.width&&
+f.height==b.format.height?(r.value=b.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):f.width==b.format.height&&f.height==b.format.width&&(r.value=b.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(u.style.display="",g.style.display="none"):(h.value=f.width/100,l.value=f.height/100,n.setAttribute("checked","checked"),
+r.value="custom",u.style.display="none",g.style.display="")}}b="format-"+b;var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var r=document.createElement("select");r.style.marginBottom="8px";r.style.width="202px";var u=document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";
+u.style.height="24px";n.style.marginRight="6px";u.appendChild(n);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";u.appendChild(p);var c=document.createElement("span");c.style.width="100px";mxUtils.write(c,mxResources.get("landscape"));u.appendChild(c);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";var h=document.createElement("input");
+h.setAttribute("size","7");h.style.textAlign="right";g.appendChild(h);mxUtils.write(g," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";g.appendChild(l);mxUtils.write(g," in");u.style.display="none";g.style.display="none";for(var t={},m=PageSetupDialog.getFormats(),q=0;q<m.length;q++){var x=m[q];t[x.key]=x;var w=document.createElement("option");w.setAttribute("value",x.key);mxUtils.write(w,x.title);r.appendChild(w)}var E=!1;k();a.appendChild(r);mxUtils.br(a);
+a.appendChild(u);a.appendChild(g);var y=f,v=function(a,c){var b=t[r.value];null!=b.format?(h.value=b.format.width/100,l.value=b.format.height/100,g.style.display="none",u.style.display=""):(u.style.display="none",g.style.display="");b=parseFloat(h.value);if(isNaN(b)||0>=b)h.value=f.width/100;b=parseFloat(l.value);if(isNaN(b)||0>=b)l.value=f.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(h.value)),Math.floor(100*parseFloat(l.value)));"custom"!=r.value&&p.checked&&(b=new mxRectangle(0,0,
+b.height,b.width));c&&E||b.width==y.width&&b.height==y.height||(y=b,null!=d&&d(y))};mxEvent.addListener(b,"click",function(a){n.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(c,"click",function(a){p.checked=!0;v(a);mxEvent.consume(a)});mxEvent.addListener(h,"blur",v);mxEvent.addListener(h,"click",v);mxEvent.addListener(l,"blur",v);mxEvent.addListener(l,"click",v);mxEvent.addListener(p,"change",v);mxEvent.addListener(n,"change",v);mxEvent.addListener(r,"change",function(a){E="custom"==r.value;
v(a,!0)});v();return{set:function(a){f=a;k(null,null,!0)},get:function(){return y},widthInput:h,heightInput:l}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]};
@@ -2045,38 +2045,38 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),c=1+f.x,f=1+f.y);h=-Math.round(h-mxUtils.mod(this.translate.x*this.scale-c,h))+"px "+-Math.round(h-mxUtils.mod(this.translate.y*this.scale-f,h))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=h,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=h,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],h=1;h<this.gridSteps;h++){var f=h*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+c)}return'<svg width="'+
c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=
-this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+b,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";c.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,h=this.view.translate,f=this.pageFormat,p=d*this.pageScale,m=this.view.getBackgroundPageBounds();b=m.width;c=m.height;var t=
-new mxRectangle(d*h.x,d*h.y,f.width*p,f.height*p),k=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(c/t.height)-1:0,w=a?Math.ceil(b/t.width)-1:0,r=m.x+b,y=m.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?k:w,b=0;b<=c;b++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(b+1)*t.height)),
-new mxPoint(Math.round(r),Math.round(m.y+(b+1)*t.height))]:[new mxPoint(Math.round(m.x+(b+1)*t.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(b+1)*t.width),Math.round(y))];null!=a[b]?(a[b].points=d,a[b].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[b]=d)}for(b=c;b<a.length;b++)a[b].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+b,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";c.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,h=this.view.translate,f=this.pageFormat,t=d*this.pageScale,m=this.view.getBackgroundPageBounds();b=m.width;c=m.height;var q=
+new mxRectangle(d*h.x,d*h.y,f.width*t,f.height*t),k=(a=a&&Math.min(q.width,q.height)>this.minPageBreakDist)?Math.ceil(c/q.height)-1:0,w=a?Math.ceil(b/q.width)-1:0,r=m.x+b,y=m.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?k:w,b=0;b<=c;b++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(b+1)*q.height)),
+new mxPoint(Math.round(r),Math.round(m.y+(b+1)*q.height))]:[new mxPoint(Math.round(m.x+(b+1)*q.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(b+1)*q.width),Math.round(y))];null!=a[b]?(a[b].points=d,a[b].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[b]=d)}for(b=c;b<a.length;b++)a[b].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,c){for(var g=0;g<d.length;g++)if(this.graph.getModel().isVertex(d[g])){var h=this.graph.getCellGeometry(d[g]);if(null!=h&&h.relative)return!1}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=f.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?
-!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,h=this.graph.pageScale,f=d.width*h,d=d.height*h,h=Math.floor(Math.min(0,b)/f),p=Math.floor(Math.min(0,
-c)/d);return new mxRectangle(this.scale*(this.translate.x+h*f),this.scale*(this.translate.y+p*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-h)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-p)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
+!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,h=this.graph.pageScale,f=d.width*h,d=d.height*h,h=Math.floor(Math.min(0,b)/f),t=Math.floor(Math.min(0,
+c)/d);return new mxRectangle(this.scale*(this.translate.x+h*f),this.scale*(this.translate.y+t*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-h)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-t)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,h,f){var g=k.apply(this,arguments);null==f||f||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var n=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=n.apply(this,arguments),h=b.getParent(d);
-if(null==c||c!=d&&c!=h)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(h)&&b.isVertex(h)&&!this.graph.isContainer(h);)d=h,h=this.graph.getModel().getParent(d);return d};var q=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=q.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),h=d.getParent(a);null!=h;){if(this.graph.isCellSelected(h)&&d.isVertex(h)){c=!0;break}h=d.getParent(h)}return c};mxGraphHandler.prototype.selectDelayed=
+if(null==c||c!=d&&c!=h)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(h)&&b.isVertex(h)&&!this.graph.isContainer(h);)d=h,h=this.graph.getModel().getParent(d);return d};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=p.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),h=d.getParent(a);null!=h;){if(this.graph.isCellSelected(h)&&d.isVertex(h)){c=!0;break}h=d.getParent(h)}return c};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(null==c||!a.isSource(c.control))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=f;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||d.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=
k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var c=mxEvent.getSource(a);
if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();
-mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var n=!1,q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return n||q.apply(this,arguments)};this.keydownHandler=
+mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var n=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return n||p.apply(this,arguments)};this.keydownHandler=
mxUtils.bind(this,function(a){32==a.which?(n=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0)});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";n=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var r=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=
function(a){return r.apply(this,arguments)||n||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var u=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return u.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};
-var c=!1,g=null,h=null,l=null,p=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=f}a=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==l)this.toolbar.createTextToolbar();else{for(var m=0;m<l.length;m++)this.toolbar.container.appendChild(l[m]);this.toolbar.fontMenu=g;this.toolbar.sizeMenu=
-h}c=d.cellEditor.isContentEditing();g=a;h=f;l=b}}),m=this,t=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){t.apply(this,arguments);p();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=m.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
-b.substring(0,b.length-1));m.toolbar.setFontName(b);m.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var x=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){x.apply(this,arguments);p()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";
-if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(E){}var w=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
-this.getKeyHandler=function(){return keyHandler};var D="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],g=[],h;for(h in c.style)a[h]!=c.style[h]&&(b.push(c.style[h]),g.push(h));h=d.getModel().getStyle(c.cell);for(var f=null!=h?h.split(";"):[],l=0;l<f.length;l++){var m=f[l],
-p=m.indexOf("=");0<=p&&(h=m.substring(0,p),m=m.substring(p+1),null!=a[h]&&"none"==m&&(b.push(m),g.push(h)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var v=
-["fontFamily","fontSize","fontColor"],A="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),F=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],v,["opacity"],["align"],["html"]];for(a=0;a<F.length;a++)for(b=0;b<F[a].length;b++)D.push(F[a][b]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(D,y[a])&&D.push(y[a]);
-var P=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var g=b.isEdge(m),h=g?d.currentEdgeStyle:d.currentVertexStyle,g=["fontSize","fontFamily","fontColor"],f=0;f<g.length;f++){var l=h[g[f]];null!=l&&d.setCellStyles(g[f],l,a)}else for(l=0;l<a.length;l++){for(var m=a[l],p=b.getStyle(m),t=null!=p?p.split(";"):[],I=D.slice(),f=0;f<t.length;f++){var v=t[f],w=v.indexOf("=");if(0<=w){var k=v.substring(0,w),A=mxUtils.indexOf(I,k);0<=A&&I.splice(A,1);for(var x=0;x<F.length;x++){var r=F[x];if(0<=
-mxUtils.indexOf(r,k))for(var n=0;n<r.length;n++){var q=mxUtils.indexOf(I,r[n]);0<=q&&I.splice(q,1)}}}}for(var h=(g=b.isEdge(m))?d.currentEdgeStyle:d.currentVertexStyle,H=b.getStyle(m),f=0;f<I.length;f++){var k=I[f],E=h[k];null==E||"shape"==k&&!g||g&&!(0>mxUtils.indexOf(y,k))||(H=mxUtils.setStyle(H,k,E))}b.setStyle(m,H)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){P(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){P(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));P(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),g=!1,h=!1;if(0<b.length)for(var f=0;f<b.length&&(g=d.getModel().isVertex(b[f])||g,!(h=d.getModel().isEdge(b[f])||h)||!g);f++);else h=g=!0;for(var b=c.getProperty("keys"),l=c.getProperty("values"),f=0;f<b.length;f++){var m=0<=mxUtils.indexOf(v,b[f]);if("strokeColor"!=b[f]||null!=l[f]&&"none"!=
-l[f])if(0<=mxUtils.indexOf(y,b[f]))h||0<=mxUtils.indexOf(A,b[f])?null==l[f]?delete d.currentEdgeStyle[b[f]]:d.currentEdgeStyle[b[f]]=l[f]:g&&0<=mxUtils.indexOf(D,b[f])&&(null==l[f]?delete d.currentVertexStyle[b[f]]:d.currentVertexStyle[b[f]]=l[f]);else if(0<=mxUtils.indexOf(D,b[f])){if(g||m)null==l[f]?delete d.currentVertexStyle[b[f]]:d.currentVertexStyle[b[f]]=l[f];if(h||m||0<=mxUtils.indexOf(A,b[f]))null==l[f]?delete d.currentEdgeStyle[b[f]]:d.currentEdgeStyle[b[f]]=l[f]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+var c=!1,g=null,h=null,l=null,t=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=f}a=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==l)this.toolbar.createTextToolbar();else{for(var m=0;m<l.length;m++)this.toolbar.container.appendChild(l[m]);this.toolbar.fontMenu=g;this.toolbar.sizeMenu=
+h}c=d.cellEditor.isContentEditing();g=a;h=f;l=b}}),m=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);t();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=m.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
+b.substring(0,b.length-1));m.toolbar.setFontName(b);m.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var x=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){x.apply(this,arguments);t()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";
+if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(F){}var w=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);
+this.getKeyHandler=function(){return keyHandler};var E="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],g=[],h;for(h in c.style)a[h]!=c.style[h]&&(b.push(c.style[h]),g.push(h));h=d.getModel().getStyle(c.cell);for(var f=null!=h?h.split(";"):[],l=0;l<f.length;l++){var m=f[l],
+t=m.indexOf("=");0<=t&&(h=m.substring(0,t),m=m.substring(t+1),null!=a[h]&&"none"==m&&(b.push(m),g.push(h)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var v=
+["fontFamily","fontSize","fontColor"],A="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),G=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],v,["opacity"],["align"],["html"]];for(a=0;a<G.length;a++)for(b=0;b<G[a].length;b++)E.push(G[a][b]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(E,y[a])&&E.push(y[a]);
+var Q=function(a,c){var b=d.getModel();b.beginUpdate();try{if(c)for(var h=b.isEdge(m),g=h?d.currentEdgeStyle:d.currentVertexStyle,h=["fontSize","fontFamily","fontColor"],f=0;f<h.length;f++){var l=g[h[f]];null!=l&&d.setCellStyles(h[f],l,a)}else for(l=0;l<a.length;l++){for(var m=a[l],t=b.getStyle(m),q=null!=t?t.split(";"):[],J=E.slice(),f=0;f<q.length;f++){var v=q[f],w=v.indexOf("=");if(0<=w){var k=v.substring(0,w),A=mxUtils.indexOf(J,k);0<=A&&J.splice(A,1);for(var x=0;x<G.length;x++){var r=G[x];if(0<=
+mxUtils.indexOf(r,k))for(var n=0;n<r.length;n++){var p=mxUtils.indexOf(J,r[n]);0<=p&&J.splice(p,1)}}}}for(var g=(h=b.isEdge(m))?d.currentEdgeStyle:d.currentVertexStyle,I=b.getStyle(m),f=0;f<J.length;f++){var k=J[f],F=g[k];null==F||"shape"==k&&!h||h&&!(0>mxUtils.indexOf(y,k))||(I=mxUtils.setStyle(I,k,F))}b.setStyle(m,I)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){Q(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){Q(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));Q(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),h=!1,g=!1;if(0<b.length)for(var f=0;f<b.length&&(h=d.getModel().isVertex(b[f])||h,!(g=d.getModel().isEdge(b[f])||g)||!h);f++);else g=h=!0;for(var b=c.getProperty("keys"),l=c.getProperty("values"),f=0;f<b.length;f++){var m=0<=mxUtils.indexOf(v,b[f]);if("strokeColor"!=b[f]||null!=l[f]&&"none"!=
+l[f])if(0<=mxUtils.indexOf(y,b[f]))g||0<=mxUtils.indexOf(A,b[f])?null==l[f]?delete d.currentEdgeStyle[b[f]]:d.currentEdgeStyle[b[f]]=l[f]:h&&0<=mxUtils.indexOf(E,b[f])&&(null==l[f]?delete d.currentVertexStyle[b[f]]:d.currentVertexStyle[b[f]]=l[f]);else if(0<=mxUtils.indexOf(E,b[f])){if(h||m)null==l[f]?delete d.currentVertexStyle[b[f]]:d.currentVertexStyle[b[f]]=l[f];if(g||m||0<=mxUtils.indexOf(A,b[f]))null==l[f]?delete d.currentEdgeStyle[b[f]]:d.currentEdgeStyle[b[f]]=l[f]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||"12"),b=d.getView().getState(d.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,c=b.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);
-this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var b=c.getProperty("cells"),g=c.getProperty("parent");d.getModel().isLayer(g)&&!d.isCellVisible(g)&&null!=b&&0<b.length&&d.getModel().setVisible(g,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
+this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var b=c.getProperty("cells"),h=c.getProperty("parent");d.getModel().isLayer(h)&&!d.isCellVisible(h)&&null!=b&&0<b.length&&d.getModel().setVisible(h,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,
"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph();this.init();this.open()};
mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=34;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:208;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
@@ -2093,29 +2093,29 @@ EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=
EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var f=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):f.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(b){var f=null;b.cellEditor.isContentEditing()?document.execCommand("paste",
!1,null):f=d.apply(this,arguments);a.updatePasteActionStates();return f};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var n=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){n.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
-this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,g){if(null!=a.container){d=null!=d?d:0;g=null!=g?g:0;var h=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),l=a.view.translate,m=a.view.scale,p=mxRectangle.fromRectangle(h);
-p.x=p.x/m-l.x;p.y=p.y/m-l.y;p.width/=m;p.height/=m;var l=a.container.scrollTop,t=a.container.scrollLeft,v=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)v+=3;var y=a.container.offsetWidth-v,v=a.container.offsetHeight-v;c=c?Math.max(.3,Math.min(b||1,y/p.width)):m;b=(y-c*p.width)/2/c;var I=0==this.lightboxVerticalDivider?0:(v-c*p.height)/this.lightboxVerticalDivider/c;f&&(b=Math.max(b,0),I=Math.max(I,0));if(f||h.width<y||h.height<v)a.view.scaleAndTranslate(c,
-Math.floor(b-p.x),Math.floor(I-p.y)),a.container.scrollTop=l*c/m,a.container.scrollLeft=t*c/m;else if(0!=d||0!=g)h=a.view.translate,a.view.setTranslate(Math.floor(h.x+d/m),Math.floor(h.y+g/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
+this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,h){if(null!=a.container){d=null!=d?d:0;h=null!=h?h:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=mxUtils.hasScrollbars(a.container),l=a.view.translate,m=a.view.scale,t=mxRectangle.fromRectangle(g);
+t.x=t.x/m-l.x;t.y=t.y/m-l.y;t.width/=m;t.height/=m;var l=a.container.scrollTop,q=a.container.scrollLeft,v=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)v+=3;var y=a.container.offsetWidth-v,v=a.container.offsetHeight-v;c=c?Math.max(.3,Math.min(b||1,y/t.width)):m;b=(y-c*t.width)/2/c;var J=0==this.lightboxVerticalDivider?0:(v-c*t.height)/this.lightboxVerticalDivider/c;f&&(b=Math.max(b,0),J=Math.max(J,0));if(f||g.width<y||g.height<v)a.view.scaleAndTranslate(c,
+Math.floor(b-t.x),Math.floor(J-t.y)),a.container.scrollTop=l*c/m,a.container.scrollLeft=q*c/m;else if(0!=d||0!=h)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/m),Math.floor(g.y+h/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace=
"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||
0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var n=0,k=mxUtils.bind(this,function(a,c,b){n++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=b&&d.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);
-return d}),q=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),r=document.createElement("div");r.style.display="inline-block";r.style.verticalAlign="top";r.style.fontFamily="Helvetica,Arial";r.style.marginTop="8px";r.style.fontSize="14px";r.style.color="#ffffff";this.chromelessToolbar.appendChild(r);var u=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,
-mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(r.innerHTML="",mxUtils.write(r,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});q.style.paddingLeft="0px";q.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",q.style.display="",r.style.display="inline-block"):
-(u.style.display="none",q.style.display="none",r.style.display="none");c()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,
-function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var h=null,l=null,p=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);h=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);h=null;l=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";l=null}),600)}),a||200)}),m=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var t=k(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
-"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=t.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),x=a.getModel();x.addListener(mxEvent.CHANGE,function(){t.style.display=1<x.getChildCount(x.root)?
+return d}),p=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),r=document.createElement("div");r.style.display="inline-block";r.style.verticalAlign="top";r.style.fontFamily="Helvetica,Arial";r.style.marginTop="8px";r.style.fontSize="14px";r.style.color="#ffffff";this.chromelessToolbar.appendChild(r);var u=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,
+mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(r.innerHTML="",mxUtils.write(r,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display="",r.style.display="inline-block"):
+(u.style.display="none",p.style.display="none",r.style.display="none");c()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,
+function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var h=null,l=null,t=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);h=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);h=null;l=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
+"none";l=null}),600)}),a||200)}),m=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var q=k(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
+"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=q.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),x=a.getModel();x.addListener(mxEvent.CHANGE,function(){q.style.display=1<x.getChildCount(x.root)?
"":"none"})}this.addChromelessToolbarItems(k);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||k(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(g=0;g<this.lightboxToolbarActions.length;g++){var w=
this.lightboxToolbarActions[g];k(w.fn,w.icon,w.tooltip)}!a.lightbox||"1"!=urlParams.close&&this.container==document.body||k(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?
-"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||m(30),p())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():m(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():m(100);mxEvent.consume(a)}));
-mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||m(30)}));var D=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<D&&Math.abs(this.scrollTop-
-a.container.scrollTop)<D&&Math.abs(this.startX-b.getGraphX())<D&&Math.abs(this.startY-b.getGraphY())<D&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?p():m(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=
-a.y-(this.y0||0)*c.height}y.apply(this,arguments)};var v=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),g=Math.ceil(2*b.x+c.width*d.width),h=Math.ceil(2*b.y+c.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=g||f.height!=h)a.minimumGraphSize=new mxRectangle(0,0,g,h);g=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==g&&this.view.translate.y==
-b?v.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(g,b),a.container.scrollLeft+=Math.round((g-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var A=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
+"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||m(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():m(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():m(100);mxEvent.consume(a)}));
+mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||m(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-
+a.container.scrollTop)<E&&Math.abs(this.startX-b.getGraphX())<E&&Math.abs(this.startY-b.getGraphY())<E&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?t():m(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=
+a.y-(this.y0||0)*c.height}y.apply(this,arguments)};var v=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),h=Math.ceil(2*b.x+c.width*d.width),g=Math.ceil(2*b.y+c.height*d.height),f=a.minimumGraphSize;if(null==f||f.width!=h||f.height!=g)a.minimumGraphSize=new mxRectangle(0,0,h,g);h=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==h&&this.view.translate.y==
+b?v.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(h,b),a.container.scrollLeft+=Math.round((h-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var A=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,g=0;null!=A&&(d=a.container.offsetWidth/2-A.x+c.x,g=a.container.offsetHeight/2-A.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&f.chromelessResize(!1,null,d*(this.cumulativeZoomFactor-1),g*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==g||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-
-1),a.container.scrollTop-=g*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var d=mxEvent.getSource(c);null!=d;){if(d==a.container){A=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}d=d.parentNode}}))};
+this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),d=0,h=0;null!=A&&(d=a.container.offsetWidth/2-A.x+c.x,h=a.container.offsetHeight/2-A.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&f.chromelessResize(!1,null,d*(this.cumulativeZoomFactor-1),h*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==h||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-
+1),a.container.scrollTop-=h*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(c))for(var d=mxEvent.getSource(c);null!=d;){if(d==a.container){A=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}d=d.parentNode}}))};
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
@@ -2141,15 +2141,15 @@ EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this
EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var n=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(a,b){n.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),f=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var n=0;n<k.length;n++){var q=k[n];a.getModel().isEdge(q)&&(d=!0);a.getModel().isVertex(q)&&(f=!0);if(d&&f)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(n=
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),f=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var n=0;n<k.length;n++){var p=k[n];a.getModel().isEdge(p)&&(d=!0);a.getModel().isVertex(p)&&(f=!0);if(d&&f)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(n=
0;n<k.length;n++)this.actions.get(k[n]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(f);this.actions.get("wordWrap").setEnabled(f);this.actions.get("autosize").setEnabled(f);d=f&&1==
a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);
this.actions.get("collapsible").setEnabled(f&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);
this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&f);this.menus.get("align").setEnabled(b&&
f&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&f&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),f=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(f=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var n=Math.max(0,Math.min(this.hsplitPosition,f-this.splitSize-20)),q=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",q+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",q+=this.toolbarHeight);0<q&&!mxClient.IS_QUIRKS&&(q+=1);var r=0;if(null!=this.sidebarFooterContainer){var u=
-this.footerHeight+k,r=Math.max(0,Math.min(d-q-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=n+"px";this.sidebarFooterContainer.style.height=r+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=n+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=u+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var n=Math.max(0,Math.min(this.hsplitPosition,f-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var r=0;if(null!=this.sidebarFooterContainer){var u=
+this.footerHeight+k,r=Math.max(0,Math.min(d-p-u,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=n+"px";this.sidebarFooterContainer.style.height=r+"px";this.sidebarFooterContainer.style.bottom=u+"px"}u=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=n+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=u+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
null!=this.hsplit.parentNode?n+this.splitSize+"px":"0px";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.footerHeight+k+"px";this.hsplit.style.left=n+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=
f+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-r+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,f-n-this.splitSize-u)+"px":f+"px",this.footerContainer.style.width=this.menubarContainer.style.width,r=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&
(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",r-=this.tabContainer.clientHeight),this.diagramContainer.style.height=r+"px",this.hsplit.style.height=r+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=u+"px",f=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,f=this.tabContainer.clientHeight),
@@ -2162,9 +2162,9 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,f,d){function k(a){if(null!=q){var h=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,r+(b?h.x-q.x:q.y-h.y)-f));mxEvent.consume(a);r!=g()&&(u=!0,c=null)}}function n(a){k(a);q=r=null}var q=null,r=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+f-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){q=new mxPoint(mxEvent.getClientX(a),
+EditorUi.prototype.addSplitHandler=function(a,b,f,d){function k(a){if(null!=p){var h=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,r+(b?h.x-p.x:p.y-h.y)-f));mxEvent.consume(a);r!=g()&&(u=!0,c=null)}}function n(a){k(a);p=r=null}var p=null,r=null,u=!0,c=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+f-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
mxEvent.getClientY(a));r=g();u=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!u&&this.hsplitClickEnabled){var b=null!=c?c-f:0;c=g();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,n)})};
-EditorUi.prototype.showDialog=function(a,b,f,d,k,n,q,r,u){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,k,n,q,r,u);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showDialog=function(a,b,f,d,k,n,p,r,u){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,k,n,p,r,u);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var f=this.dialogs.pop();0==f.close(a,b)?this.dialogs.push(f):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),mxUtils.clearSelection(),this.editor.fireEvent(new mxEventObject("hideDialog")))}};
EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,d=f.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,a||"none",function(a){f.cellEditor.restoreSelection(d);b(a)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(n.container,230,k,!0,!1);n.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
@@ -2174,15 +2174,15 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,f=null;null
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(f){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
EditorUi.prototype.executeLayout=function(a,b,f){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(d.getModel().endUpdate(),null!=f&&f())}}};
-EditorUi.prototype.showImageDialog=function(a,b,f,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),n=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=n&&0<n.length){var q=new Image;q.onload=function(){f(n,q.width,q.height)};q.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=n}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.showImageDialog=function(a,b,f,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),n=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=n&&0<n.length){var p=new Image;p.onload=function(){f(n,p.width,p.height)};p.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=n}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,340,340,!0,!1,null,!1),a.init())};
EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var f=new Image;f.onload=function(){a(new mxImage(b,f.width,f.height))};f.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};f.src=b}else a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,f){mxUtils.confirm(a)?null!=b&&b():null!=f&&f()};
EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){q.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var g=d.getSelectionCells(),h=0;h<g.length;h++)if(d.getModel().isVertex(g[h])&&d.isCellResizable(g[h])){var f=d.getCellGeometry(g[h]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-c):38==a?f.height=Math.max(0,f.height-c):39==a?f.width+=c:40==a&&(f.height+=c),d.getModel().setGeometry(g[h],f))}}finally{d.getModel().endUpdate()}}else g=
+EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var g=d.getSelectionCells(),h=0;h<g.length;h++)if(d.getModel().isVertex(g[h])&&d.isCellResizable(g[h])){var f=d.getCellGeometry(g[h]);null!=f&&(f=f.clone(),37==a?f.width=Math.max(0,f.width-c):38==a?f.height=Math.max(0,f.height-c):39==a?f.width+=c:40==a&&(f.height+=c),d.getModel().setGeometry(g[h],f))}}finally{d.getModel().endUpdate()}}else g=
d.getSelectionCell(),h=d.model.getParent(g),f=null,1==d.getSelectionCount()&&d.model.isVertex(g)&&null!=d.layoutManager&&!d.isCellLocked(g)&&(f=d.layoutManager.getLayout(h)),null!=f&&f.constructor==mxStackLayout?(f=h.getIndex(g),37==a||38==a?d.model.add(h,g,Math.max(0,f-1)):39!=a&&40!=a||d.model.add(h,g,Math.min(d.model.getChildCount(h),f+1))):(h=g=0,37==a?g=-c:38==a?h=-c:39==a?g=c:40==a&&(h=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),g,h))});null!=r&&window.clearTimeout(r);r=window.setTimeout(function(){if(0<
-q.length){d.getModel().beginUpdate();try{for(var a=0;a<q.length;a++)q[a]();q=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var f=this,d=this.editor.graph,k=new mxKeyHandler(d),n=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
-!mxClient.IS_SF)&&n.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],r=null,u={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
+p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var f=this,d=this.editor.graph,k=new mxKeyHandler(d),n=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+!mxClient.IS_SF)&&n.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],r=null,u={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},c=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&
mxEvent.isAltDown(a)){var g=f.actions.get(f.altShiftActions[a.keyCode]);if(null!=g)return g.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=u[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),u[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&
d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return c.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,b,d){var g=this.actions.get(b);
null!=g&&(b=function(){g.isEnabled()&&g.funct()},c?d?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):d?k.bindShiftKey(a,b):k.bindKey(a,b))});var g=k.escape;k.escape=function(a){g.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,
@@ -2196,38 +2196,38 @@ EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),
(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,f){return null};
Graph=function(a,b,f,d,k){mxGraph.call(this,a,b,f,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var n=null,q=null,r=null,u=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var g=d.getState();null!=g&&this.model.isEdge(g.cell)&&(n=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(g.cell),r=g,q=d,null!=
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var n=null,p=null,r=null,u=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var g=d.getState();null!=g&&this.model.isEdge(g.cell)&&(n=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(g.cell),r=g,p=d,null!=
g.text&&null!=g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,d.getGraphX(),d.getGraphY())?u=mxEvent.LABEL_HANDLE:(g=this.selectionCellsHandler.getHandler(g.cell),null!=g&&null!=g.bends&&0<g.bends.length&&(u=g.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,g;for(g in d)if(null!=d[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(g=this.tolerance,null!=n&&null!=r&&null!=q){if(d=r,Math.abs(n.x-b.getGraphX())>g||Math.abs(n.y-b.getGraphY())>g){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var h=this.selectionCellsHandler.getHandler(d.cell);if(null!=h&&null!=h.bends&&0<h.bends.length){var f=h.getHandleForEvent(q),l=this.view.getEdgeStyle(d);g=l==mxEdgeStyle.EntityRelation;c||u!=mxEvent.LABEL_HANDLE||(f=u);if(g&&0!=f&&f!=h.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!g||
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(g=this.tolerance,null!=n&&null!=r&&null!=p){if(d=r,Math.abs(n.x-b.getGraphX())>g||Math.abs(n.y-b.getGraphY())>g){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var h=this.selectionCellsHandler.getHandler(d.cell);if(null!=h&&null!=h.bends&&0<h.bends.length){var f=h.getHandleForEvent(p),l=this.view.getEdgeStyle(d);g=l==mxEdgeStyle.EntityRelation;c||u!=mxEvent.LABEL_HANDLE||(f=u);if(g&&0!=f&&f!=h.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!g||
null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=d.visibleSourceState||f==h.bends.length-1||null!=d.visibleTargetState)g||f==mxEvent.LABEL_HANDLE||(g=d.absolutePoints,null!=g&&(null==l&&null==f||l==mxEdgeStyle.OrthConnector)&&(f=u,null==f&&(f=new mxRectangle(n.x,n.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,g[0].x,g[0].y)?f=0:mxUtils.contains(f,g[g.length-1].x,g[g.length-1].y)?
-f=h.bends.length-1:null!=l&&(2==g.length||3==g.length&&(0==Math.round(g[0].x-g[1].x)&&0==Math.round(g[1].x-g[2].x)||0==Math.round(g[0].y-g[1].y)&&0==Math.round(g[1].y-g[2].y)))?f=2:(f=mxUtils.findNearestSegment(d,n.x,n.y),f=null==l?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),h.start(b.getGraphX(),b.getGraphX(),f),u=n=q=r=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){h=null;g=d.absolutePoints;if(null!=g)if(f=new mxRectangle(b.getGraphX(),
+f=h.bends.length-1:null!=l&&(2==g.length||3==g.length&&(0==Math.round(g[0].x-g[1].x)&&0==Math.round(g[1].x-g[2].x)||0==Math.round(g[0].y-g[1].y)&&0==Math.round(g[1].y-g[2].y)))?f=2:(f=mxUtils.findNearestSegment(d,n.x,n.y),f=null==l?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),h.start(b.getGraphX(),b.getGraphX(),f),u=n=p=r=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){h=null;g=d.absolutePoints;if(null!=g)if(f=new mxRectangle(b.getGraphX(),
b.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))h="move";else if(mxUtils.contains(f,g[0].x,g[0].y)||mxUtils.contains(f,g[g.length-1].x,g[g.length-1].y))h="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)l=this.view.getEdgeStyle(d),h="crosshair",l!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(l=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
-l<g.length-1&&0<=l&&(h=0==Math.round(g[l].x-g[l+1].x)?"col-resize":"row-resize"));null!=h&&d.setCursor(h)}}),mouseUp:mxUtils.bind(this,function(a,c){u=n=q=r=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+l<g.length-1&&0<=l&&(h=0==Math.round(g[l].x-g[l+1].x)?"col-resize":"row-resize"));null!=h&&d.setCursor(h)}}),mouseUp:mxUtils.bind(this,function(a,c){u=n=p=r=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
function(){var a=g.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,d=this.graph.pageScale,h=b.width*d,b=b.height*d,d=this.graph.view.translate,f=this.graph.view.scale,l=this.graph.getPageLayout(),m=0;m<l.width;m++)c.push(new mxRectangle(((l.x+m)*h+d.x)*f,(l.y*b+d.y)*f,h*f,b*f));for(m=0;m<l.height;m++)c.push(new mxRectangle((l.x*h+d.x)*f,((l.y+m)*b+d.y)*f,h*f,b*f));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],d=0;d<c.length;d++){var g=this.graph.view.getState(c[d]),g=null!=g?g.style:this.graph.getCellStyle(c[d]);
"1"==mxUtils.getValue(g,"part","0")?(g=this.graph.model.getParent(c[d]),this.graph.model.isVertex(g)&&0>mxUtils.indexOf(c,g)&&b.push(g)):b.push(c[d])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var h=new mxRubberband(this);
-this.getRubberband=function(){return h};var l=(new Date).getTime(),p=0,m=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;m.apply(this,arguments);a!=this.currentState?(l=(new Date).getTime(),p=0):p=(new Date).getTime()-l};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<p||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&t.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=h.isForceRubberbandEvent;h.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var D=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(D=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=D)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return y.apply(this,
+this.getRubberband=function(){return h};var l=(new Date).getTime(),t=0,m=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;m.apply(this,arguments);a!=this.currentState?(l=(new Date).getTime(),t=0):t=(new Date).getTime()-l};var q=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<t||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&q.apply(this,arguments)};var x=this.isToggleEvent;this.isToggleEvent=function(a){return x.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=h.isForceRubberbandEvent;h.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return y.apply(this,
arguments);c=c?a.sourceState.cell:a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)))};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var v=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=
-this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,g,h){h=null!=h?h:[];if(0<b||0<d){var f=this.getModel(),l=a+b,m=c+d;null==g&&(g=this.getCurrentRoot(),null==g&&(g=f.getRoot()));if(null!=g)for(var p=f.getChildCount(g),I=0;I<p;I++){var t=f.getChildAt(g,I),v=this.view.getState(t);if(null!=
-v&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(v.style,"locked","0")){var y=mxUtils.getValue(v.style,mxConstants.STYLE_ROTATION)||0;0!=y&&(v=mxUtils.getBoundingBox(v,y));(f.isEdge(t)||f.isVertex(t))&&v.x>=a&&v.y+v.height<=m&&v.y>=c&&v.x+v.width<=l&&h.push(t);this.getAllCells(a,c,b,d,t,h)}}}return h};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=
-this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();F=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=
-c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),h.start(b.x,b.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);F=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var P=this.updateMouseEvent;this.updateMouseEvent=function(a){a=P.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
+this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,d,g,h){h=null!=h?h:[];if(0<b||0<d){var f=this.getModel(),l=a+b,m=c+d;null==g&&(g=this.getCurrentRoot(),null==g&&(g=f.getRoot()));if(null!=g)for(var t=f.getChildCount(g),J=0;J<t;J++){var q=f.getChildAt(g,J),v=this.view.getState(q);if(null!=
+v&&this.isCellVisible(q)&&"1"!=mxUtils.getValue(v.style,"locked","0")){var y=mxUtils.getValue(v.style,mxConstants.STYLE_ROTATION)||0;0!=y&&(v=mxUtils.getBoundingBox(v,y));(f.isEdge(q)||f.isVertex(q))&&v.x>=a&&v.y+v.height<=m&&v.y>=c&&v.x+v.width<=l&&h.push(q);this.getAllCells(a,c,b,d,q,h)}}}return h};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=
+this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var G=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();G=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=
+c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),h.start(b.x,b.y)):null!=G?this.addSelectionCells(G):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);G=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var Q=this.updateMouseEvent;this.updateMouseEvent=function(a){a=Q.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,f){f=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,b)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,n=null,q=mxUtils.bind(this,function(a){k=!0;n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),r=mxUtils.bind(this,function(a){k=k&&null!=n&&Math.abs(n.x-mxEvent.getClientX(a))<b&&Math.abs(n.y-mxEvent.getClientY(a))<b}),u=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
-b&&b!=f.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(f.node,q,r,u);mxEvent.addListener(f.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,f,q,r,u){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
-b,f,q,r,u){q=null!=q?q:!0;r=null!=r?r:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var c=this.model.getChildCount(f)-1;0<=c;c--){var d=this.model.getChildAt(f,c),h=this.getScaledCellAt(a,b,d,q,r,u);if(null!=h)return h;if(this.isCellVisible(d)&&(r&&this.model.isEdge(d)||q&&this.model.isVertex(d))&&(h=this.view.getState(d),null!=h&&(null==u||!u(h,a,b))&&this.intersects(h,a,b)))return d}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,n=null,p=mxUtils.bind(this,function(a){k=!0;n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),r=mxUtils.bind(this,function(a){k=k&&null!=n&&Math.abs(n.x-mxEvent.getClientX(a))<b&&Math.abs(n.y-mxEvent.getClientY(a))<b}),u=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
+b&&b!=f.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(f.node,p,r,u);mxEvent.addListener(f.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO};Graph.prototype.getCellAt=function(a,b,f,p,r,u){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,
+b,f,p,r,u){p=null!=p?p:!0;r=null!=r?r:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var c=this.model.getChildCount(f)-1;0<=c;c--){var d=this.model.getChildAt(f,c),h=this.getScaledCellAt(a,b,d,p,r,u);if(null!=h)return h;if(this.isCellVisible(d)&&(r&&this.model.isEdge(d)||p&&this.model.isVertex(d))&&(h=this.view.getState(d),null!=h&&(null==u||!u(h,a,b))&&this.intersects(h,a,b)))return d}return null};mxCellHighlight.prototype.getStrokeWidth=function(a){a=
this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,f=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*f,(a.y+b.y)*f,a.width*f,a.height*f);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=
function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();
-if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");a.setAttribute("transform","scale("+this.currentScale+","+this.currentScale+")translate("+this.currentTranslate.x+","+this.currentTranslate.y+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var f=a.style.display;a.style.display="none";a.getBBox();a.style.display=f}}catch(q){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
+if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");a.setAttribute("transform","scale("+this.currentScale+","+this.currentScale+")translate("+this.currentTranslate.x+","+this.currentTranslate.y+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var f=a.style.display;a.style.display="none";a.getBBox();a.style.display=f}}catch(p){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,f=this.scale,n=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=f,this.translate=n)};var f=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,n){var d=this.useCssTransforms,k=this.view.scale,u=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
!1);f.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=u,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.labelLinkClicked=function(a,b,f){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(f)}};
Graph.prototype.openLink=function(a,b,f){var d=window;"_self"==b&&window!=window.top?window.location.href=a:a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top?(a=a.split("#")[1],window.location.hash=="#"+a&&(window.location.hash=""),window.location.hash=a):(d=window.open(a,b),null==d||f||(d.opener=null));return d};Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};
@@ -2244,30 +2244,30 @@ Graph.prototype.isSplitTarget=function(a,b,f){return!this.model.isEdge(b[0])&&!m
Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,q=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var r=f?"getUTC":"get",u=a[r+"Date"](),c=a[r+"Day"](),g=a[r+"Month"](),h=a[r+"FullYear"](),l=a[r+"Hours"](),p=a[r+"Minutes"](),m=a[r+"Seconds"](),r=a[r+"Milliseconds"](),t=f?0:a.getTimezoneOffset(),x={d:u,dd:q(u),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:g+1,mm:q(g+1),mmm:d.i18n.monthNames[g],mmmm:d.i18n.monthNames[g+
-12],yy:String(h).slice(2),yyyy:h,h:l%12||12,hh:q(l%12||12),H:l,HH:q(l),M:p,MM:q(p),s:m,ss:q(m),l:q(r,3),L:q(99<r?Math.round(r/10):r),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(n,""),o:(0<t?"-":"+")+q(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var r=f?"getUTC":"get",u=a[r+"Date"](),c=a[r+"Day"](),g=a[r+"Month"](),h=a[r+"FullYear"](),l=a[r+"Hours"](),t=a[r+"Minutes"](),m=a[r+"Seconds"](),r=a[r+"Milliseconds"](),q=f?0:a.getTimezoneOffset(),x={d:u,dd:p(u),ddd:d.i18n.dayNames[c],dddd:d.i18n.dayNames[c+7],m:g+1,mm:p(g+1),mmm:d.i18n.monthNames[g],mmmm:d.i18n.monthNames[g+
+12],yy:String(h).slice(2),yyyy:h,h:l%12||12,hh:p(l%12||12),H:l,HH:p(l),M:t,MM:p(t),s:m,ss:p(m),l:p(r,3),L:p(99<r?Math.round(r/10):r),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(n,""),o:(0<q?"-":"+")+p(100*Math.floor(Math.abs(q)/60)+Math.abs(q)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),f=b.getChildCount(b.root),d=0;d<f;d++)mxUtils.bind(this,function(d){var f=document.createElement("div");f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.padding="2px";f.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),
k.defaultChecked=!0);f.appendChild(k);var r=this.convertValueToString(d)||mxResources.get("background")||"Background";f.setAttribute("title",r);mxUtils.write(f,r);a.appendChild(f);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
-Graph.prototype.replacePlaceholders=function(a,b){var f=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var n=null;if(match.index>d&&"%"==b.charAt(match.index-1))n=k.substring(1);else{var q=k.substring(1,k.length-1);if(0>q.indexOf("{"))for(var r=a;null==n&&null!=r;)null!=r.value&&"object"==typeof r.value&&(n=r.hasAttribute(q)?null!=r.getAttribute(q)?r.getAttribute(q):"":null),r=this.model.getParent(r);null==n&&(n=this.getGlobalVariable(q))}f.push(b.substring(d,
+Graph.prototype.replacePlaceholders=function(a,b){var f=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var n=null;if(match.index>d&&"%"==b.charAt(match.index-1))n=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var r=a;null==n&&null!=r;)null!=r.value&&"object"==typeof r.value&&(n=r.hasAttribute(p)?null!=r.getAttribute(p)?r.getAttribute(p):"":null),r=this.model.getParent(r);null==n&&(n=this.getGlobalVariable(p))}f.push(b.substring(d,
match.index)+(null!=n?n:k));d=match.index+k.length}}f.push(b.substring(d))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,b,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=f&&(mxEvent.isTouchEvent(b)?f.update(f.getState(this.view.getState(a[1]))):f.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,b,f,d,k,n){n=n?n:!1;var q=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(q.x+=a.geometry.width/2,q.y-=f):b==mxConstants.DIRECTION_SOUTH?(q.x+=a.geometry.width/2,q.y+=a.geometry.height+f):(q.x=b==mxConstants.DIRECTION_WEST?q.x-f:q.x+(a.geometry.width+f),q.y+=a.geometry.height/2);f=this.view.getState(this.model.getParent(a));
-var r=this.view.scale,u=this.view.translate,c=u.x*r,u=u.y*r;this.model.isVertex(f.cell)&&(c=f.x,u=f.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(q.x+=a.parent.geometry.x,q.y+=a.parent.geometry.y);n=n||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+q.x*r,u+q.y*r);this.model.isAncestor(n,a)&&(n=null);for(f=n;null!=f;){if(this.isCellLocked(f)){n=null;break}f=this.model.getParent(f)}null!=n&&(f=this.view.getState(a),r=this.view.getState(n),null!=f&&null!=r&&mxUtils.intersects(f,r)&&(n=
-null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?q.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?q.y+=a.geometry.height/2:q.x=b==mxConstants.DIRECTION_WEST?q.x-a.geometry.width/2:q.x+a.geometry.width/2;null==n||this.isCellConnectable(n)||(f=this.getModel().getParent(n),this.getModel().isVertex(f)&&this.isCellConnectable(f)&&(n=f));if(n==a||this.model.isEdge(n)||!this.isCellConnectable(n))n=null;f=[];this.model.beginUpdate();try{r=n;if(null==r&&k){for(var c=a,g=this.getCellGeometry(a);null!=
-g&&g.relative;)c=this.getModel().getParent(c),g=this.getCellGeometry(c);var h=this.view.getState(c),l=null!=h?h.style:this.getCellStyle(c);if(mxUtils.getValue(l,"part",!1)){var p=this.model.getParent(c);this.model.isVertex(p)&&(c=p)}r=this.duplicateCells([c],!1)[0];g=this.getCellGeometry(r);null!=g&&(g.x=q.x-g.width/2,g.y=q.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var m=mxEvent.isControlDown(d)&&k||null==n&&null!=g&&g.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,r,this.createCurrentEdgeStyle());if(null!=m&&this.connectionHandler.insertBeforeSource){var t=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=m.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==m.parent&&(t=d.parent.getIndex(d),this.model.add(d.parent,m,t))}null==n&&null!=r&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(t=a.parent.getIndex(a),this.model.add(a.parent,
-r,t));null!=m&&f.push(m);null==n&&null!=r&&f.push(r);null==r&&null!=m&&m.geometry.setTerminalPoint(q,!1);null!=m&&this.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{this.model.endUpdate()}return f};
+Graph.prototype.connectVertex=function(a,b,f,d,k,n){n=n?n:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=f):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+f):(p.x=b==mxConstants.DIRECTION_WEST?p.x-f:p.x+(a.geometry.width+f),p.y+=a.geometry.height/2);f=this.view.getState(this.model.getParent(a));
+var r=this.view.scale,u=this.view.translate,c=u.x*r,u=u.y*r;this.model.isVertex(f.cell)&&(c=f.x,u=f.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);n=n||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(c+p.x*r,u+p.y*r);this.model.isAncestor(n,a)&&(n=null);for(f=n;null!=f;){if(this.isCellLocked(f)){n=null;break}f=this.model.getParent(f)}null!=n&&(f=this.view.getState(a),r=this.view.getState(n),null!=f&&null!=r&&mxUtils.intersects(f,r)&&(n=
+null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==n||this.isCellConnectable(n)||(f=this.getModel().getParent(n),this.getModel().isVertex(f)&&this.isCellConnectable(f)&&(n=f));if(n==a||this.model.isEdge(n)||!this.isCellConnectable(n))n=null;f=[];this.model.beginUpdate();try{r=n;if(null==r&&k){for(var c=a,g=this.getCellGeometry(a);null!=
+g&&g.relative;)c=this.getModel().getParent(c),g=this.getCellGeometry(c);var h=this.view.getState(c),l=null!=h?h.style:this.getCellStyle(c);if(mxUtils.getValue(l,"part",!1)){var t=this.model.getParent(c);this.model.isVertex(t)&&(c=t)}r=this.duplicateCells([c],!1)[0];g=this.getCellGeometry(r);null!=g&&(g.x=p.x-g.width/2,g.y=p.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var m=mxEvent.isControlDown(d)&&k||null==n&&null!=g&&g.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,r,this.createCurrentEdgeStyle());if(null!=m&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=m.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==m.parent&&(q=d.parent.getIndex(d),this.model.add(d.parent,m,q))}null==n&&null!=r&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(q=a.parent.getIndex(a),this.model.add(a.parent,
+r,q));null!=m&&f.push(m);null==n&&null!=r&&f.push(r);null==r&&null!=m&&m.geometry.setTerminalPoint(p,!1);null!=m&&this.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{this.model.endUpdate()}return f};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],f,d;for(d in this.model.cells)if(f=this.model.cells[d],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(a.innerHTML=this.getLabel(f),f=mxUtils.extractTextWithWhitespace([a])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&b.push(f);return b.join(" ")};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),f=a,d=null;null==d&&null!=f;)null!=f.value&&"object"==typeof f.value&&(d=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f);return d||""}return a.value.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!f.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,b,f,d,k){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<f.length;n++){var q=this.view.getState(f[n]),r=this.getCellGeometry(f[n]);if(null!=q&&null!=r){var u=Math.round(r.width-q.width/this.view.scale),c=Math.round(r.height-q.height/this.view.scale);if(0!=c||0!=u){var g=this.model.getParent(f[n]),h=this.layoutManager.getLayout(g);
-null==h?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(q,g,u,c):null!=k&&mxEvent.isAltDown(k)||h.constructor!=mxStackLayout||h.resizeLast||this.resizeParentStacks(g,h,u,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
-Graph.prototype.moveSiblings=function(a,b,f,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var n=this.view.getState(k[b]),q=this.getCellGeometry(k[b]);null!=n&&null!=q&&(q=q.clone(),q.translate(Math.round(f*Math.max(0,Math.min(1,(n.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(n.y-a.y)/a.height)))),this.model.setGeometry(k[b],q))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,f,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var n=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=n&&(n=n.clone(),b.horizontal?n.width+=f+Math.min(0,q.width/this.view.scale-n.width):n.height+=d+Math.min(0,q.height/this.view.scale-n.height),this.model.setGeometry(a,
+Graph.prototype.foldCells=function(a,b,f,d,k){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<f.length;n++){var p=this.view.getState(f[n]),r=this.getCellGeometry(f[n]);if(null!=p&&null!=r){var u=Math.round(r.width-p.width/this.view.scale),c=Math.round(r.height-p.height/this.view.scale);if(0!=c||0!=u){var g=this.model.getParent(f[n]),h=this.layoutManager.getLayout(g);
+null==h?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(p,g,u,c):null!=k&&mxEvent.isAltDown(k)||h.constructor!=mxStackLayout||h.resizeLast||this.resizeParentStacks(g,h,u,c)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
+Graph.prototype.moveSiblings=function(a,b,f,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var n=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=n&&null!=p&&(p=p.clone(),p.translate(Math.round(f*Math.max(0,Math.min(1,(n.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(n.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,f,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var n=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=n&&(n=n.clone(),b.horizontal?n.width+=f+Math.min(0,p.width/this.view.scale-n.width):n.height+=d+Math.min(0,p.height/this.view.scale-n.height),this.model.setGeometry(a,
n));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,f){f=f||this.getDefaultParent();this.isCellLocked(f)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,f){f=f||this.getDefaultParent();return this.isCellLocked(f)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
@@ -2311,23 +2311,23 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activa
this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this,arguments);null!=
d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var f=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return f.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var f=function(c,b,g){var h=new mxPoint(b,g);h.type=c;d.push(h);h=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==h||h.type!=c||h.x!=b||h.y!=g},p=.5*this.scale,b=!1,d=[],m=0;m<c.length-1;m++){for(var t=c[m+1],k=c[m],w=[],r=c[m+2];m<
-c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,t.x,t.y)<1*this.scale*this.scale;)t=r,m++,r=c[m+2];for(var b=f(0,k.x,k.y)||b,y=0;y<this.validEdges.length;y++){var v=this.validEdges[y],A=v.absolutePoints;if(null!=A&&mxUtils.intersects(a,v)&&"1"!=v.style.noJump)for(v=0;v<A.length-1;v++){for(var n=A[v+1],q=A[v],r=A[v+2];v<A.length-2&&mxUtils.ptSegDistSq(q.x,q.y,r.x,r.y,n.x,n.y)<1*this.scale*this.scale;)n=r,v++,r=A[v+2];r=mxUtils.intersection(k.x,k.y,t.x,t.y,q.x,q.y,n.x,n.y);if(null!=r&&(Math.abs(r.x-
-q.x)>p||Math.abs(r.y-q.y)>p)&&(Math.abs(r.x-n.x)>p||Math.abs(r.y-n.y)>p)){n=r.x-k.x;q=r.y-k.y;r={distSq:n*n+q*q,x:r.x,y:r.y};for(n=0;n<w.length;n++)if(w[n].distSq>r.distSq){w.splice(n,0,r);r=null;break}null==r||0!=w.length&&w[w.length-1].x===r.x&&w[w.length-1].y===r.y||w.push(r)}}}for(v=0;v<w.length;v++)b=f(1,w[v].x,w[v].y)||b}r=c[c.length-1];b=f(0,r.x,r.y)||b}a.routedPoints=d;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){this.routedPoints=
-null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,"jumpStyle","none"),m,t=!0,r=null,w=null;m=[];var n=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var v=
-this.state.routedPoints[y],A=new mxPoint(v.x/this.scale,v.y/this.scale);0==y?A=c[0]:y==this.state.routedPoints.length-1&&(A=c[c.length-1]);var q=!1;if(null!=r&&1==v.type){var u=this.state.routedPoints[y+1],v=u.x/this.scale-A.x,u=u.y/this.scale-A.y,v=v*v+u*u;null==n&&(n=new mxPoint(A.x-r.x,A.y-r.y),w=Math.sqrt(n.x*n.x+n.y*n.y),n.x=n.x*g/w,n.y=n.y*g/w);v>g*g&&0<w&&(v=r.x-A.x,u=r.y-A.y,v=v*v+u*u,v>g*g&&(q=new mxPoint(A.x-n.x,A.y-n.y),v=new mxPoint(A.x+n.x,A.y+n.y),m.push(q),this.addPoints(a,m,b,d,!1,
-null,t),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,t=!1,"sharp"==f?(a.lineTo(q.x-n.y*m,q.y+n.x*m),a.lineTo(v.x-n.y*m,v.y+n.x*m),a.lineTo(v.x,v.y)):"arc"==f?(m*=1.3,a.curveTo(q.x-n.y*m,q.y+n.x*m,v.x-n.y*m,v.y+n.x*m,v.x,v.y)):(a.moveTo(v.x,v.y),t=!0),m=[v],q=!0))}else n=null;q||(m.push(A),r=A)}this.addPoints(a,m,b,d,!1,null,t);a.stroke()}};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==
-a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)n.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var g=this.getNextPoint(a,b,d),f=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),t=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=h)var k=Math.cos(-h),w=Math.sin(-h),g=mxUtils.getRotatedPoint(g,k,w,t);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);g=this.getPerimeterPoint(c,g,0==h&&f,k);0!=h&&(k=Math.cos(h),w=Math.sin(h),g=mxUtils.getRotatedPoint(g,k,w,t));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,g),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,f){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;if(null!=a)for(var g=0;g<a.length;g++){var h=this.graph.getConnectionPoint(c,a[g]);if(null!=h){var l=(h.x-f.x)*(h.x-f.x)+(h.y-f.y)*(h.y-f.y);if(null==d||l<d)b=h,d=l}}null!=b&&(f=b)}return f};
-var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var r=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var f=function(c,b,g){var h=new mxPoint(b,g);h.type=c;d.push(h);h=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==h||h.type!=c||h.x!=b||h.y!=g},t=.5*this.scale,b=!1,d=[],m=0;m<c.length-1;m++){for(var q=c[m+1],k=c[m],w=[],r=c[m+2];m<
+c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,r.x,r.y,q.x,q.y)<1*this.scale*this.scale;)q=r,m++,r=c[m+2];for(var b=f(0,k.x,k.y)||b,y=0;y<this.validEdges.length;y++){var v=this.validEdges[y],A=v.absolutePoints;if(null!=A&&mxUtils.intersects(a,v)&&"1"!=v.style.noJump)for(v=0;v<A.length-1;v++){for(var n=A[v+1],p=A[v],r=A[v+2];v<A.length-2&&mxUtils.ptSegDistSq(p.x,p.y,r.x,r.y,n.x,n.y)<1*this.scale*this.scale;)n=r,v++,r=A[v+2];r=mxUtils.intersection(k.x,k.y,q.x,q.y,p.x,p.y,n.x,n.y);if(null!=r&&(Math.abs(r.x-
+p.x)>t||Math.abs(r.y-p.y)>t)&&(Math.abs(r.x-n.x)>t||Math.abs(r.y-n.y)>t)){n=r.x-k.x;p=r.y-k.y;r={distSq:n*n+p*p,x:r.x,y:r.y};for(n=0;n<w.length;n++)if(w[n].distSq>r.distSq){w.splice(n,0,r);r=null;break}null==r||0!=w.length&&w[w.length-1].x===r.x&&w[w.length-1].y===r.y||w.push(r)}}}for(v=0;v<w.length;v++)b=f(1,w[v].x,w[v].y)||b}r=c[c.length-1];b=f(0,r.x,r.y)||b}a.routedPoints=d;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){this.routedPoints=
+null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,f=mxUtils.getValue(this.style,"jumpStyle","none"),m,q=!0,r=null,w=null;m=[];var n=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var v=
+this.state.routedPoints[y],A=new mxPoint(v.x/this.scale,v.y/this.scale);0==y?A=c[0]:y==this.state.routedPoints.length-1&&(A=c[c.length-1]);var p=!1;if(null!=r&&1==v.type){var u=this.state.routedPoints[y+1],v=u.x/this.scale-A.x,u=u.y/this.scale-A.y,v=v*v+u*u;null==n&&(n=new mxPoint(A.x-r.x,A.y-r.y),w=Math.sqrt(n.x*n.x+n.y*n.y),n.x=n.x*g/w,n.y=n.y*g/w);v>g*g&&0<w&&(v=r.x-A.x,u=r.y-A.y,v=v*v+u*u,v>g*g&&(p=new mxPoint(A.x-n.x,A.y-n.y),v=new mxPoint(A.x+n.x,A.y+n.y),m.push(p),this.addPoints(a,m,b,d,!1,
+null,q),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,q=!1,"sharp"==f?(a.lineTo(p.x-n.y*m,p.y+n.x*m),a.lineTo(v.x-n.y*m,v.y+n.x*m),a.lineTo(v.x,v.y)):"arc"==f?(m*=1.3,a.curveTo(p.x-n.y*m,p.y+n.x*m,v.x-n.y*m,v.y+n.x*m,v.x,v.y)):(a.moveTo(v.x,v.y),q=!0),m=[v],p=!0))}else n=null;p||(m.push(A),r=A)}this.addPoints(a,m,b,d,!1,null,q);a.stroke()}};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==
+a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)n.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var g=this.getNextPoint(a,b,d),h=this.graph.isOrthogonal(a),f=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),q=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=f)var k=Math.cos(-f),w=Math.sin(-f),g=mxUtils.getRotatedPoint(g,k,w,q);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);g=this.getPerimeterPoint(c,g,0==f&&h,k);0!=f&&(k=Math.cos(f),w=Math.sin(f),g=mxUtils.getRotatedPoint(g,k,w,q));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,g),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,f){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;if(null!=a)for(var g=0;g<a.length;g++){var h=this.graph.getConnectionPoint(c,a[g]);if(null!=h){var l=(h.x-f.x)*(h.x-f.x)+(h.y-f.y)*(h.y-f.y);if(null==d||l<d)b=h,d=l}}null!=b&&(f=b)}return f};
+var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var d=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(d=b.state.view.graph.replacePlaceholders(b.state.cell,d));return d};var r=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=
c.substring(8,c.length-1),d=mxUtils.parseXml(a.view.graph.decompress(b));return new mxShape(new mxStencil(d.documentElement))}catch(l){null!=window.console&&console.log("Error in shape: "+l)}}return r.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var n=
-mxUtils.load(k);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",k,q)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxUtils.load(k);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],f=2;f<a.length-1;f++)b+="/"+a[f];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,f,d){var k=mxStencilRegistry.packages[a];if(null!=f&&f||null==k){var n=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,n=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,n))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;n=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!=
+mxStencilRegistry.loadStencilSet=function(a,b,f,d){var k=mxStencilRegistry.packages[a];if(null!=f&&f||null==k){var n=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,n=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,n))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;n=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!=
k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,n)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,f),d=d.nextSibling;else{f=null!=f?f:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),n=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(k+n.toLowerCase(),new mxStencil(d));if(null!=b){var q=d.getAttribute("w"),
-r=d.getAttribute("h"),q=null==q?80:parseInt(q,10),r=null==r?80:parseInt(r,10);b(k,n,a,q,r)}}d=d.nextSibling}}};
+mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,f),d=d.nextSibling;else{f=null!=f?f:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),n=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(k+n.toLowerCase(),new mxStencil(d));if(null!=b){var p=d.getAttribute("w"),
+r=d.getAttribute("h"),p=null==p?80:parseInt(p,10),r=null==r?80:parseInt(r,10);b(k,n,a,p,r)}}d=d.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR=
"#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||
b.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));
@@ -2335,64 +2335,64 @@ for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[
a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=null;return b});return a};mxConnectionHandler.prototype.isCellEnabled=function(a){return!this.graph.isCellLocked(a)};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&
(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&
null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};
-Graph.prototype.importGraphModel=function(a,c,b,d){c=null!=c?c:0;b=null!=b?b:0;var g=new mxCodec(a.ownerDocument),f=new mxGraphModel;g.decode(a,f);a=[];g=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges()));if(null!=g){g=g.slice();this.model.beginUpdate();try{if(1!=g.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<g.length;f++)a=a.concat(this.model.getChildren(this.moveCells([g[f]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(f.getChildren(g[0]),c,b,!1,this.getDefaultParent());
-if(d){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var h=this.getBoundingBoxFromGeometry(a,!0);null!=h&&this.moveCells(a,c-h.x,b-h.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=null;if(null!=a.shape){var d=a.shape.direction,g=a.shape.bounds,f=a.shape.scale,b=g.width/f,g=g.height/f;if(d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH)var h=b,b=g,g=h;b=a.shape.getConstraints(a.style,b,g)}if(null!=b)return b;
-b=mxUtils.getValue(a.style,"points",null);if(null!=b){d=[];try{for(var l=JSON.parse(b),b=0;b<l.length;b++)h=l[b],d.push(new mxConnectionConstraint(new mxPoint(h[0],h[1]),2<h.length?"0"!=h[2]:!0,null,3<h.length?h[3]:0,4<h.length?h[4]:0))}catch(K){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),
+Graph.prototype.importGraphModel=function(a,c,b,d){c=null!=c?c:0;b=null!=b?b:0;var g=new mxCodec(a.ownerDocument),h=new mxGraphModel;g.decode(a,h);a=[];g=h.getChildren(this.cloneCell(h.root,this.isCloneInvalidEdges()));if(null!=g){g=g.slice();this.model.beginUpdate();try{if(1!=g.length||this.isCellLocked(this.getDefaultParent()))for(h=0;h<g.length;h++)a=a.concat(this.model.getChildren(this.moveCells([g[h]],c,b,!1,this.model.getRoot())[0]));else a=this.moveCells(h.getChildren(g[0]),c,b,!1,this.getDefaultParent());
+if(d){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var f=this.getBoundingBoxFromGeometry(a,!0);null!=f&&this.moveCells(a,c-f.x,b-f.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=null;if(null!=a.shape){var d=a.shape.direction,g=a.shape.bounds,h=a.shape.scale,b=g.width/h,g=g.height/h;if(d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH)var f=b,b=g,g=f;b=a.shape.getConstraints(a.style,b,g)}if(null!=b)return b;
+b=mxUtils.getValue(a.style,"points",null);if(null!=b){d=[];try{for(var l=JSON.parse(b),b=0;b<l.length;b++)f=l[b],d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}catch(L){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),
c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,d=0;d<c;d++){var g=this.model.getChildAt(a,d);this.model.isVertex(g)&&(g=this.getCellGeometry(g),null==g||g.relative||b++)}return 0<b||this.isContainer(a)};
Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();
-try{for(var d=0;d<a.length;d++){var g=a[d];if(c.isEdge(g)){var f=c.getTerminal(g,!0),h=c.getTerminal(g,!1);c.setTerminal(g,h,!0);c.setTerminal(g,f,!1);var l=c.getGeometry(g);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var m=l.getTerminalPoint(!0),p=l.getTerminalPoint(!1);l.setTerminalPoint(m,!1);l.setTerminalPoint(p,!0);c.setGeometry(g,l);var t=this.view.getState(g),v=this.view.getState(f),y=this.view.getState(h);if(null!=t){var I=null!=v?this.getConnectionConstraint(t,v,!0):null,k=
-null!=y?this.getConnectionConstraint(t,y,!1):null;this.setConnectionConstraint(g,f,!0,k);this.setConnectionConstraint(g,h,!1,I)}b.push(g)}}else if(c.isVertex(g)&&(l=this.getCellGeometry(g),null!=l)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var w=l.width;l.width=l.height;l.height=w;c.setGeometry(g,l);var A=this.view.getState(g);if(null!=A){var r=A.style[mxConstants.STYLE_DIRECTION]||"east";"east"==r?r="south":"south"==r?r="west":"west"==r?r="north":"north"==r&&(r="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,
+try{for(var d=0;d<a.length;d++){var g=a[d];if(c.isEdge(g)){var h=c.getTerminal(g,!0),f=c.getTerminal(g,!1);c.setTerminal(g,f,!0);c.setTerminal(g,h,!1);var l=c.getGeometry(g);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var m=l.getTerminalPoint(!0),t=l.getTerminalPoint(!1);l.setTerminalPoint(m,!1);l.setTerminalPoint(t,!0);c.setGeometry(g,l);var q=this.view.getState(g),v=this.view.getState(h),y=this.view.getState(f);if(null!=q){var J=null!=v?this.getConnectionConstraint(q,v,!0):null,k=
+null!=y?this.getConnectionConstraint(q,y,!1):null;this.setConnectionConstraint(g,h,!0,k);this.setConnectionConstraint(g,f,!1,J)}b.push(g)}}else if(c.isVertex(g)&&(l=this.getCellGeometry(g),null!=l)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var w=l.width;l.width=l.height;l.height=w;c.setGeometry(g,l);var A=this.view.getState(g);if(null!=A){var r=A.style[mxConstants.STYLE_DIRECTION]||"east";"east"==r?r="south":"south"==r?r="west":"west"==r?r="north":"north"==r&&(r="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,
r,[g])}b.push(g)}}}finally{c.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b=
0;b<c.length;b++){var d=this.view.getState(c[b]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)?this.removeStateForCell(c[b]):this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],!1,!1)}}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};
-Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),g=0;g<a.length;g++)if(this.isHtmlLabel(a[g])){var f=this.convertValueToString(a[g]);if(null!=f&&0<f.length){d.innerHTML=f;for(var h=d.getElementsByTagName(null!=b?b:"*"),l=0;l<h.length;l++)c(h[l]);d.innerHTML!=f&&this.cellLabelChanged(a[g],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=this.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&
-"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),g=a;null!=g;){if(g==this.model.getRoot()||null!=g.value&&"object"==typeof g.value&&g.hasAttribute(d)){this.setAttributeForCell(g,d,c);break}g=this.model.getParent(g)}var f=a.value.cloneNode(!0);f.setAttribute("label",c);c=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=
-new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var g=this.model.getParent(a[b]);null==g||c.get(g)||(c.put(g,!0),d.push(g))}for(b=0;b<d.length;b++)if(g=this.view.getState(d[b]),null!=g&&(this.model.isEdge(g.cell)||this.model.isVertex(g.cell))&&this.isCellDeletable(g.cell)){var f=mxUtils.getValue(g.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),h=mxUtils.getValue(g.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(f==mxConstants.NONE&&h==mxConstants.NONE){f=
-!0;for(h=0;h<this.model.getChildCount(g.cell)&&f;h++)c.get(this.model.getChildAt(g.cell,h))||(f=!1);f&&a.push(g.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var d=this.view.getState(a[b]);if(null!=d){var g=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);g==mxConstants.NONE&&
+Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),g=0;g<a.length;g++)if(this.isHtmlLabel(a[g])){var h=this.convertValueToString(a[g]);if(null!=h&&0<h.length){d.innerHTML=h;for(var f=d.getElementsByTagName(null!=b?b:"*"),l=0;l<f.length;l++)c(f[l]);d.innerHTML!=h&&this.cellLabelChanged(a[g],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=this.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&
+"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),g=a;null!=g;){if(g==this.model.getRoot()||null!=g.value&&"object"==typeof g.value&&g.hasAttribute(d)){this.setAttributeForCell(g,d,c);break}g=this.model.getParent(g)}var h=a.value.cloneNode(!0);h.setAttribute("label",c);c=h}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=
+new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var g=this.model.getParent(a[b]);null==g||c.get(g)||(c.put(g,!0),d.push(g))}for(b=0;b<d.length;b++)if(g=this.view.getState(d[b]),null!=g&&(this.model.isEdge(g.cell)||this.model.isVertex(g.cell))&&this.isCellDeletable(g.cell)){var h=mxUtils.getValue(g.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(g.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);if(h==mxConstants.NONE&&f==mxConstants.NONE){h=
+!0;for(f=0;f<this.model.getChildCount(g.cell)&&h;f++)c.get(this.model.getChildAt(g.cell,f))||(h=!1);h&&a.push(g.cell)}}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var d=this.view.getState(a[b]);if(null!=d){var g=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);g==mxConstants.NONE&&
d==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell=function(a,c,b){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=b&&
0<b.length?d.setAttribute(c,b):d.removeAttribute(c);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,c,b,d){this.getModel();if(mxEvent.isAltDown(c))return null;for(var g=0;g<a.length;g++)if(this.model.isEdge(this.model.getParent(a[g])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,
c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var d=this.model.isEdge(c)?this.view.getState(c):null,g=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=g||null!=d&&null!=d.text&&null!=d.text.node&&(mxUtils.contains(d.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||
!(null!=d||mxClient.IS_VML&&g==this.view.getCanvas()||mxClient.IS_SVG&&g==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,d))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),g=this.getPageSize(),c=Math.max(c,d.x*g.width),b=Math.max(b,d.y*g.height);
return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),d=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var d=new mxCell;d.value="Text";
-d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var g=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*g.x)/1E4;d.geometry.y=Math.round(g.y);d.geometry.offset=new mxPoint(0,0);var g=this.view.getPoint(b,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-g.x)/f),Math.round((c-g.y)/f))}else d.style+=
+d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var g=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*g.x)/1E4;d.geometry.y=Math.round(g.y);d.geometry.offset=new mxPoint(0,0);var g=this.view.getPoint(b,d.geometry),h=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-g.x)/h),Math.round((c-g.y)/h))}else d.style+=
"autosize=1;align=left;verticalAlign=top;spacingTop=-4;",g=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-g.x,d.geometry.y=Math.round(c/this.view.scale)-g.y;this.getModel().beginUpdate();try{this.addCells([d],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?
this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.addClickHandler=function(a,c,b){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var d=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=d&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",d),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,d);d();var g=this.container.style.cursor,
-f=this.getTolerance(),h=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(h,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==h.getLinkForCell(c.cell))a=h.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==h.getLinkForCell(a.cell)}),c=h.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=
-this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=h.container.scrollLeft;this.scrollTop=h.container.scrollTop;null==this.currentLink&&"auto"==h.container.style.overflow&&(h.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(h.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>f||d>f)&&this.clear()}}else{for(b=
-c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=h.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&h.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!h.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,d){for(var g=d.getSource(),l=d.getEvent();null!=g&&"a"!=g.nodeName.toLowerCase();)g=g.parentNode;null==
-g&&Math.abs(this.scrollLeft-h.container.scrollLeft)<f&&Math.abs(this.scrollTop-h.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(g=h.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&g||null==c||c(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":g?h.linkTarget:"_top",
-h.openLink(this.currentLink,l),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-h.container.scrollLeft)<f&&Math.abs(this.scrollTop-h.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=h.getAbsoluteUrl(h.getLinkForCell(a.cell));null!=this.currentLink&&(h.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=h.container&&
-(h.container.style.cursor=g);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=h.tooltipHandler&&h.tooltipHandler.hide()}};h.click=function(a){};h.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,g=[];b.beginUpdate();try{for(var h=this.cloneCells(a,!1,null,
-!0),f=0;f<a.length;f++){var l=b.getParent(a[f]),m=this.moveCells([h[f]],d,d,!1)[0];g.push(m);if(c)b.add(l,h[f]);else{var p=l.getIndex(a[f]);b.add(l,h[f],p+1)}}}finally{b.endUpdate()}return g};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),g=[],h=0;h<d.length;h++)g.push(d[h]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==g.length+1)for(h=a.length-1;0<=h;h--)if(0==h||
-a[h]!=g[h-1]){a[h].setAttribute("width",c);a[h].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],d=0;d<c.length;d++)b.push(c[d]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(d=c.length-1;0<=d;d--)if(c[d]!=b[d-1]){for(c=c[d].getElementsByTagName("a");0<
+h=this.getTolerance(),f=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(f,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==f.getLinkForCell(c.cell))a=f.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==f.getLinkForCell(a.cell)}),c=f.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=
+this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=f.container.scrollLeft;this.scrollTop=f.container.scrollTop;null==this.currentLink&&"auto"==f.container.style.overflow&&(f.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(f.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>h||d>h)&&this.clear()}}else{for(b=
+c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=f.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&f.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!f.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,d){for(var g=d.getSource(),l=d.getEvent();null!=g&&"a"!=g.nodeName.toLowerCase();)g=g.parentNode;null==
+g&&Math.abs(this.scrollLeft-f.container.scrollLeft)<h&&Math.abs(this.scrollTop-f.container.scrollTop)<h&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(g=f.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&g||null==c||c(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":g?f.linkTarget:"_top",
+f.openLink(this.currentLink,l),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-f.container.scrollLeft)<h&&Math.abs(this.scrollTop-f.container.scrollTop)<h&&Math.abs(this.startX-d.getGraphX())<h&&Math.abs(this.startY-d.getGraphY())<h&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=f.getAbsoluteUrl(f.getLinkForCell(a.cell));null!=this.currentLink&&(f.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=f.container&&
+(f.container.style.cursor=g);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=f.tooltipHandler&&f.tooltipHandler.hide()}};f.click=function(a){};f.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,g=[];b.beginUpdate();try{for(var f=this.cloneCells(a,!1,null,
+!0),h=0;h<a.length;h++){var l=b.getParent(a[h]),m=this.moveCells([f[h]],d,d,!1)[0];g.push(m);if(c)b.add(l,f[h]);else{var t=l.getIndex(a[h]);b.add(l,f[h],t+1)}}}finally{b.endUpdate()}return g};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),g=[],f=0;f<d.length;f++)g.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==g.length+1)for(f=a.length-1;0<=f;f--)if(0==f||
+a[f]!=g[f-1]){a[f].setAttribute("width",c);a[f].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],d=0;d<c.length;d++)b.push(c[d]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(d=c.length-1;0<=d;d--)if(c[d]!=b[d-1]){for(c=c[d].getElementsByTagName("a");0<
c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,
-c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],d=null,g=null,h=0;h<c.length;h++)if(this.getModel().isVertex(c[h])){var f=this.view.getState(c[h]);if(null!=f){var l=a?f.getCenterX():f.getCenterY(),d=null!=d?Math.max(d,l):l,g=null!=g?Math.min(g,l):l;b.push(f)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});f=this.view.translate;l=this.view.scale;g=g/l-(a?f.x:f.y);d=d/l-(a?f.x:f.y);this.getModel().beginUpdate();try{for(var m=(d-g)/(b.length-1),d=g,h=1;h<
-b.length-1;h++){var p=this.view.getState(this.model.getParent(b[h].cell)),t=this.getCellGeometry(b[h].cell),d=d+m;null!=t&&null!=p&&(t=t.clone(),a?t.x=Math.round(d-t.width/2)-p.origin.x:t.y=Math.round(d-t.height/2)-p.origin.y,this.getModel().setGeometry(b[h].cell,t))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=
-new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<c.length;d++){var g=this.view.getState(a[d]);if(null!=g){var h=this.getCellGeometry(c[d]);null==h||!h.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(h.relative=!1,h.x=g.x/g.view.scale-g.view.translate.x,h.y=g.y/g.view.scale-g.view.translate.y)}}b=new mxCodec;g=new mxGraphModel;h=g.getChildAt(g.getRoot(),0);for(d=0;d<a.length;d++)g.add(h,c[d]);return b.encode(g)};Graph.prototype.createSvgImageExport=function(){var a=
-new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,d,g,h,f,l,m,p){var t=this.useCssTransforms;t&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;g=null!=g?g:!0;h=null!=h?h:!0;f=null!=f?f:!0;var v=h||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==v)throw Error(mxResources.get("drawingEmpty"));var y=this.view.scale,
-k=mxUtils.createXmlDocument(),w=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=w.style?w.style.backgroundColor=a:w.setAttribute("style","background-color:"+a));null==k.createElementNS?(w.setAttribute("xmlns",mxConstants.NS_SVG),w.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):w.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/y;var A=Math.max(1,Math.ceil(v.width*a)+2*b)+(p?5:0),r=Math.max(1,Math.ceil(v.height*
-a)+2*b)+(p?5:0);w.setAttribute("version","1.1");w.setAttribute("width",A+"px");w.setAttribute("height",r+"px");w.setAttribute("viewBox",(g?"-0.5 -0.5":"0 0")+" "+A+" "+r);k.appendChild(w);var x=this.createSvgCanvas(w);x.foOffset=g?-.5:0;x.textOffset=g?-.5:0;x.imageOffset=g?-.5:0;x.translate(Math.floor((b/c-v.x)/y),Math.floor((b/c-v.y)/y));var n=document.createElement("textarea"),z=x.createAlternateContent;x.createAlternateContent=function(a,c,b,d,g,h,f,l,m,p,t,v,y){var w=this.state;if(null!=this.foAltText&&
-(0==d||0!=w.fontSize&&h.length<5*d/w.fontSize)){var k=this.createElement("text");k.setAttribute("x",Math.round(d/2));k.setAttribute("y",Math.round((g+w.fontSize)/2));k.setAttribute("fill",w.fontColor||"black");k.setAttribute("text-anchor","middle");k.setAttribute("font-size",Math.round(w.fontSize)+"px");k.setAttribute("font-family",w.fontFamily);(w.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&k.setAttribute("font-weight","bold");(w.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
-k.setAttribute("font-style","italic");(w.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.setAttribute("text-decoration","underline");try{return n.innerHTML=h,k.textContent=n.value,k}catch(ua){return z.apply(this,arguments)}}else return z.apply(this,arguments)};var I=this.backgroundImage;if(null!=I){c=y/c;var q=this.view.translate,F=new mxRectangle(q.x*c,q.y*c,I.width*c,I.height*c);mxUtils.intersects(v,F)&&x.image(q.x,q.y,I.width,I.height,I.src,!0)}x.scale(a);x.textEnabled=f;l=
-null!=l?l:this.createSvgImageExport();var D=l.drawCellState;l.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),g=b.model.getParent(a.cell);!h&&!d&&null!=g;)d=b.isCellSelected(g),g=b.model.getParent(g);(h||d)&&D.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),x);this.updateSvgLinks(w,m,!0);return w}finally{t&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");
+c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],d=null,g=null,f=0;f<c.length;f++)if(this.getModel().isVertex(c[f])){var h=this.view.getState(c[f]);if(null!=h){var l=a?h.getCenterX():h.getCenterY(),d=null!=d?Math.max(d,l):l,g=null!=g?Math.min(g,l):l;b.push(h)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});h=this.view.translate;l=this.view.scale;g=g/l-(a?h.x:h.y);d=d/l-(a?h.x:h.y);this.getModel().beginUpdate();try{for(var m=(d-g)/(b.length-1),d=g,f=1;f<
+b.length-1;f++){var t=this.view.getState(this.model.getParent(b[f].cell)),q=this.getCellGeometry(b[f].cell),d=d+m;null!=q&&null!=t&&(q=q.clone(),a?q.x=Math.round(d-q.width/2)-t.origin.x:q.y=Math.round(d-q.height/2)-t.origin.y,this.getModel().setGeometry(b[f].cell,q))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=
+new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<c.length;d++){var g=this.view.getState(a[d]);if(null!=g){var f=this.getCellGeometry(c[d]);null==f||!f.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=g.x/g.view.scale-g.view.translate.x,f.y=g.y/g.view.scale-g.view.translate.y)}}b=new mxCodec;g=new mxGraphModel;f=g.getChildAt(g.getRoot(),0);for(d=0;d<a.length;d++)g.add(f,c[d]);return b.encode(g)};Graph.prototype.createSvgImageExport=function(){var a=
+new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,d,g,f,h,l,m,t){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;g=null!=g?g:!0;f=null!=f?f:!0;h=null!=h?h:!0;var v=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==v)throw Error(mxResources.get("drawingEmpty"));var y=this.view.scale,
+k=mxUtils.createXmlDocument(),w=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=w.style?w.style.backgroundColor=a:w.setAttribute("style","background-color:"+a));null==k.createElementNS?(w.setAttribute("xmlns",mxConstants.NS_SVG),w.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):w.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/y;var A=Math.max(1,Math.ceil(v.width*a)+2*b)+(t?5:0),r=Math.max(1,Math.ceil(v.height*
+a)+2*b)+(t?5:0);w.setAttribute("version","1.1");w.setAttribute("width",A+"px");w.setAttribute("height",r+"px");w.setAttribute("viewBox",(g?"-0.5 -0.5":"0 0")+" "+A+" "+r);k.appendChild(w);var x=this.createSvgCanvas(w);x.foOffset=g?-.5:0;x.textOffset=g?-.5:0;x.imageOffset=g?-.5:0;x.translate(Math.floor((b/c-v.x)/y),Math.floor((b/c-v.y)/y));var n=document.createElement("textarea"),z=x.createAlternateContent;x.createAlternateContent=function(a,c,b,d,g,f,h,l,m,t,q,v,y){var w=this.state;if(null!=this.foAltText&&
+(0==d||0!=w.fontSize&&f.length<5*d/w.fontSize)){var k=this.createElement("text");k.setAttribute("x",Math.round(d/2));k.setAttribute("y",Math.round((g+w.fontSize)/2));k.setAttribute("fill",w.fontColor||"black");k.setAttribute("text-anchor","middle");k.setAttribute("font-size",Math.round(w.fontSize)+"px");k.setAttribute("font-family",w.fontFamily);(w.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&k.setAttribute("font-weight","bold");(w.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
+k.setAttribute("font-style","italic");(w.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.setAttribute("text-decoration","underline");try{return n.innerHTML=f,k.textContent=n.value,k}catch(ua){return z.apply(this,arguments)}}else return z.apply(this,arguments)};var J=this.backgroundImage;if(null!=J){c=y/c;var p=this.view.translate,G=new mxRectangle(p.x*c,p.y*c,J.width*c,J.height*c);mxUtils.intersects(v,G)&&x.image(p.x,p.y,J.width,J.height,J.src,!0)}x.scale(a);x.textEnabled=h;l=
+null!=l?l:this.createSvgImageExport();var E=l.drawCellState;l.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),g=b.model.getParent(a.cell);!f&&!d&&null!=g;)d=b.isCellSelected(g),g=b.model.getParent(g);(f||d)&&E.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),x);this.updateSvgLinks(w,m,!0);return w}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");
for(var d=0;d<a.length;d++){var g=a[d].getAttribute("href");null==g&&(g=a[d].getAttribute("xlink:href"));null!=g&&(null!=c&&/^https?:\/\//.test(g)?a[d].setAttribute("target",c):b&&this.isCustomLink(g)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&
(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",
-a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=b.rows[0].cells,g=0,h=0;h<d.length;h++)var f=d[h].getAttribute("colspan"),g=g+(null!=f?parseInt(f):1);b=b.insertRow(c);for(h=0;h<g;h++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var g=document.createElement("th");b.rows[d].appendChild(g);mxUtils.br(g)}b=
+a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=b.rows[0].cells,g=0,f=0;f<d.length;f++)var h=d[f].getAttribute("colspan"),g=g+(null!=h?parseInt(h):1);b=b.insertRow(c);for(f=0;f<g;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var g=document.createElement("th");b.rows[d].appendChild(g);mxUtils.br(g)}b=
a.tBodies[0];for(d=0;d<b.rows.length;d++)g=b.rows[d].insertCell(c),mxUtils.br(g);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,d=0;d<b.length;d++)b[d].cells.length>c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();
for(var d;d=b.firstChild;)lastNode=a.appendChild(d);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel",this.linkRelation);d.setAttribute("href",
this.getAbsoluteUrl(a));d.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&d.setAttribute("target",this.linkTarget);mxUtils.write(d,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return d};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,
function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor=
-"default");return c};var c=!1,b=!1,d=!1,g=this.fireMouseEvent;this.fireMouseEvent=function(a,h,f){a==mxEvent.MOUSE_DOWN&&(h=this.updateMouseEvent(h),c=this.isCellSelected(h.getCell()),b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());g.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,g){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==g.getState()||!g.isSource(g.getState().control))&&(this.popupMenuHandler.popupTrigger||
+"default");return c};var c=!1,b=!1,d=!1,g=this.fireMouseEvent;this.fireMouseEvent=function(a,f,h){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),c=this.isCellSelected(f.getCell()),b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());g.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,g){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==g.getState()||!g.isSource(g.getState().control))&&(this.popupMenuHandler.popupTrigger||
!d&&!mxEvent.isMouseEvent(g.getEvent())&&(b&&null==g.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(g.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,d=a.rangeCount;b<
-d;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(X){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&
-(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var n=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?n.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var q=mxCellEditor.prototype.startEditing;
-mxCellEditor.prototype.startEditing=function(a,c){q.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border=
+d;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(Y){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&
+(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var n=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?n.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;
+mxCellEditor.prototype.startEditing=function(a,c){p.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border=
"gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var r=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var d=b.firstChild;null!=a&&null!=d;)c(a,d),a=a.nextSibling,d=d.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=
a)d(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var g=a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=g}}function d(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;d(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),
a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}r.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),
c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){l=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<l.length&&"\n"==l.charAt(l.length-1)&&(l=l.substring(0,l.length-1));l=this.graph.sanitizeHtml(c?l.replace(/\n/g,"<br/>"):l,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),
-g=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),h=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.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.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=h?"bold":"normal";this.textarea.style.fontStyle=f?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=g;this.textarea.style.padding="0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));
+g=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,h=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.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.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=h?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=g;this.textarea.style.padding="0px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));
this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var l=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(l=mxUtils.replaceTrailingNewlines(l,"<div><br></div>"));l=this.graph.sanitizeHtml(c?l.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):l,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=
mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=l&&(this.textarea.innerHTML=l);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var u=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,
@@ -2400,15 +2400,15 @@ mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxCon
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,
"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",u.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};
mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var c=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&
-this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(I){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,
+this.toggleViewMode();c.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(J){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,c){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=
function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var h=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,g,f){mxEvent.isAltDown(f)&&(g=null);h.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/
d-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/d-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};
var l=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=l.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),
this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px",null!=this.linkHint&&
-(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,g=this.graph.view.scale,h=this.roundLength(b.x/g-d.x),d=this.roundLength(b.y/g-d.y);this.hint.innerHTML=h+", "+d;this.hint.style.visibility=
-"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(h=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*h.x)+"%, "+Math.round(100*h.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&
+(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,g=this.graph.view.scale,f=this.roundLength(b.x/g-d.x),d=this.roundLength(b.y/g-d.y);this.hint.innerHTML=f+", "+d;this.hint.style.visibility=
+"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(f=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*f.x)+"%, "+Math.round(100*f.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&
(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+
"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):
new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAVCAYAAACkCdXRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA6ZJREFUeNqM001IY1cUB/D/fYmm2sbR2lC1zYlgoRG6MpEyBlpxM9iFIGKFIm3s0lCKjOByhCLZCFqLBF1YFVJdSRbdFHRhBbULtRuFVBTzYRpJgo2mY5OX5N9Fo2TG+eiFA/dd3vvd8+65ByTxshARTdf1JySp6/oTEdFe9T5eg5lIcnBwkCSZyWS+exX40oyur68/KxaLf5Okw+H4X+A9JBaLfUySZ2dnnJqaosPhIAACeC34DJRKpb7IZrMcHx+nwWCgUopGo/EOKwf9fn/1CzERUevr6+9ls1mOjIwQAH0+H4PBIKPR6D2ofAQCgToRUeVYJUkuLy8TANfW1kiS8/PzCy84Mw4MDBAAZ2dnmc/nub+/X0MSEBF1cHDwMJVKsaGhgV6vl+l0mqOjo1+KyKfl1dze3l4NBoM/PZ+diFSLiIKIGBOJxA9bW1sEwNXVVSaTyQMRaRaRxrOzs+9J8ujoaE5EPhQRq67rcZ/PRwD0+/3Udf03EdEgIqZisZibnJykwWDg4eEhd3Z2xkXELCJvPpdBrYjUiEhL+Xo4HH4sIhUaAKNSqiIcDsNkMqG+vh6RSOQQQM7tdhsAQCkFAHC73UUATxcWFqypVApmsxnDw8OwWq2TADQNgAYAFosF+XweyWQSdru9BUBxcXFRB/4rEgDcPouIIx6P4+bmBi0tLSCpAzBqAIqnp6c/dnZ2IpfLYXNzE62traMADACKNputpr+/v8lms9UAKAAwiMjXe3t7KBQKqKurQy6Xi6K0i2l6evpROp1mbW0t29vbGY/Hb8/IVIqq2zlJXl1dsaOjg2azmefn5wwEAl+JSBVExCgi75PkzMwMlVJsbGxkIpFgPp8PX15ePopEIs3JZPITXdf/iEajbGpqolKKExMT1HWdHo/nIxGpgIgoEXnQ3d39kCTHxsYIgC6Xi3NzcwyHw8xkMozFYlxaWmJbWxuVUuzt7WUul6PX6/1cRN4WEe2uA0SkaWVl5XGpRVhdXU0A1DSNlZWVdz3qdDrZ09PDWCzG4+Pjn0XEWvp9KJKw2WwKwBsA3gHQHAqFfr24uMDGxgZ2d3cRiUQAAHa7HU6nE319fTg5Ofmlq6vrGwB/AngaCoWK6rbsNptNA1AJoA7Aux6Pp3NoaMhjsVg+QNmIRqO/u1yubwFEASRKUAEA7rASqABUAKgC8KAUb5XWCOAfAFcA/gJwDSB7C93DylCtdM8qABhLc5TumV6KQigUeubjfwcAHkQJ94ndWeYAAAAASUVORK5CYII=":
@@ -2418,50 +2418,50 @@ HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.protot
HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=
!0;mxVertexHandler.prototype.rotationHandleVSpacing=-20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var p=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){p.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
+function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var t=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){t.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,
-d=null,g=null,h=null,f=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,g=this.first.y,h=(this.currentX-d)/this.graph.view.scale,f=(this.currentY-g)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(h=this.graph.snap(h),f=this.graph.snap(f),this.graph.isGridEnabled()||(Math.abs(h)<this.graph.tolerance&&(h=0),Math.abs(f)<this.graph.tolerance&&(f=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var h=new mxRectangle(this.x,
-this.y,this.width,this.height),l=this.graph.getCells(h.x,h.y,h.width,h.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(d,g,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var m=this.graph.view.getState(l[b]),p=this.graph.getCellGeometry(l[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(h,f),this.graph.model.setGeometry(l[b],p))}}finally{this.graph.model.endUpdate()}}else h=
-new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(h,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;var d=c.getX()+b.x,b=c.getY()+b.y,g=this.first.x-d,h=this.first.y-b,f=this.graph.tolerance;if(null!=this.div||Math.abs(g)>f||Math.abs(h)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
+d=null,g=null,f=null,h=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,g=this.first.y,f=(this.currentX-d)/this.graph.view.scale,h=(this.currentY-g)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(f=this.graph.snap(f),h=this.graph.snap(h),this.graph.isGridEnabled()||(Math.abs(f)<this.graph.tolerance&&(f=0),Math.abs(h)<this.graph.tolerance&&(h=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var f=new mxRectangle(this.x,
+this.y,this.width,this.height),l=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(d,g,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var m=this.graph.view.getState(l[b]),t=this.graph.getCellGeometry(l[b]);null!=m&&null!=t&&(t=t.clone(),t.translate(f,h),this.graph.model.setGeometry(l[b],t))}}finally{this.graph.model.endUpdate()}}else f=
+new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;var d=c.getX()+b.x,b=c.getY()+b.y,g=this.first.x-d,f=this.first.y-b,h=this.graph.tolerance;if(null!=this.div||Math.abs(g)>h||Math.abs(f)>h)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),
this.update(d,b),this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,g=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/g)*g,this.height=this.graph.snap(this.height/g)*g,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor=
"white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+
"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var m=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null);m.apply(this,arguments)};var t=(new Date).getTime(),x=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){w.apply(this,arguments);b!=this.currentTerminalState?(t=(new Date).getTime(),x=0):x=(new Date).getTime()-t;this.currentTerminalState=b};var D=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
-2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&D.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),g=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
+this.secondDiv=null);m.apply(this,arguments)};var q=(new Date).getTime(),x=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){w.apply(this,arguments);b!=this.currentTerminalState?(q=(new Date).getTime(),x=0):x=(new Date).getTime()-q;this.currentTerminalState=b};var E=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&
+2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&E.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),g=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,
d,b):null,b=null!=(null!=g?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),g):null)?this.fixedHandleImage:null!=g&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;
mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var v=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),
null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return v.apply(this,arguments)};var A=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,
-new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):A.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),g=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==g||!g.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
-function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var P=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){P.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var E=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var H=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
+new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):A.apply(this,arguments)};var G=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),g=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==g||!g.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&G.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
+function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var Q=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){Q.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var F=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){F.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(b,
d);if(null!=b||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));
this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,
function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,
-null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var g=document.createElement("div");g.style.marginTop=null!=c||0<d?"6px":"0px";g.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));this.linkHint.appendChild(g)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var L=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){L.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
+null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var g=document.createElement("div");g.style.marginTop=null!=c||0<d?"6px":"0px";g.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));this.linkHint.appendChild(g)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var M=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){M.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(c,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);
this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var z=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){z.apply(this,
arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||
-"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var J=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
-function(){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){N.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
-null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var R=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(R.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
-a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var V=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){V.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&
-(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function n(){mxActor.call(this)}function q(){mxCylinder.call(this)}function r(){mxActor.call(this)}function u(){mxActor.call(this)}function c(){mxActor.call(this)}function g(){mxActor.call(this)}function h(){mxActor.call(this)}function l(){mxActor.call(this)}function p(){mxActor.call(this)}function m(a,c){this.canvas=
+"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=
+function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=
+null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var T=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(T.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),
+a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var W=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var V=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){V.apply(this,arguments);null!=this.linkHint&&
+(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function n(){mxActor.call(this)}function p(){mxCylinder.call(this)}function r(){mxActor.call(this)}function u(){mxActor.call(this)}function c(){mxActor.call(this)}function g(){mxActor.call(this)}function h(){mxActor.call(this)}function l(){mxActor.call(this)}function t(){mxActor.call(this)}function m(a,c){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function D(){mxActor.call(this)}function y(){mxActor.call(this)}function v(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function P(){mxShape.call(this)}function E(){mxShape.call(this)}
-function H(){mxEllipse.call(this)}function L(){mxShape.call(this)}function z(){mxShape.call(this)}function B(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function N(){mxShape.call(this)}function R(){mxShape.call(this)}function V(){mxShape.call(this)}function U(){mxShape.call(this)}function I(){mxCylinder.call(this)}function ha(){mxDoubleEllipse.call(this)}function na(){mxDoubleEllipse.call(this)}function X(){mxArrowConnector.call(this);this.spacing=0}function aa(){mxArrowConnector.call(this);
-this.spacing=0}function M(){mxActor.call(this)}function G(){mxRectangleShape.call(this)}function T(){mxActor.call(this)}function K(){mxActor.call(this)}function O(){mxActor.call(this)}function S(){mxActor.call(this)}function ja(){mxActor.call(this)}function C(){mxActor.call(this)}function da(){mxActor.call(this)}function W(){mxActor.call(this)}function Y(){mxActor.call(this)}function ba(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
-function sa(){mxRhombus.call(this)}function la(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function ia(){mxActor.call(this)}function fa(){mxActor.call(this)}function ca(){mxConnector.call(this)}function ya(a,c,b,d,g,h,f,l,m,p){f+=m;var ga=d.clone();d.x-=g*(2*f+m);d.y-=h*(2*f+m);g*=f+m;h*=f+m;return function(){a.ellipse(ga.x-g-f,ga.y-h-f,2*f,2*f);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
-mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,d,g){var h=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ga=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(d-h,0);a.lineTo(d,
-h);a.lineTo(d,g);a.lineTo(h,g);a.lineTo(0,g-h);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-h,0),a.lineTo(d,h),a.lineTo(h,h),a.close(),a.fill()),0!=ga&&(a.setFillAlpha(Math.abs(ga)),a.setFillColor(0>ga?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(h,h),a.lineTo(h,g),a.lineTo(0,g-h),a.close(),a.fill()),a.begin(),a.moveTo(h,g),a.lineTo(h,h),a.lineTo(0,
-0),a.moveTo(h,h),a.lineTo(d,h),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var wa=Math.tan(mxUtils.toRadians(30)),ra=(.5-wa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/wa);a.translate((d-c)/2,(g-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*
-c,c*ra);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ra)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,c,b,d,g,h){c=Math.min(d,g/(.5+wa));h?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-ra)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-ra)*c),a.lineTo(.5*c,(1-ra)*c)):(a.translate((d-c)/2,(g-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ra),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ra)*c),a.lineTo(0,
-.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,g,h){c=Math.min(g/2,Math.round(g/8)+this.strokewidth-1);if(h&&null!=this.fill||!h&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),h||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),h||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),h||(a.stroke(),a.begin()),a.translate(0,-c);h||(a.moveTo(0,
-c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,g-c),a.curveTo(d,g+c/3,0,g+c/3,0,g-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,c,b,d,g){var h=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),
-f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(d-h,0);a.lineTo(d,h);a.lineTo(d,g);a.lineTo(0,g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-h,0),a.lineTo(d-h,h),a.lineTo(d,h),a.close(),a.fill()),a.begin(),a.moveTo(d-h,0),a.lineTo(d-h,h),a.lineTo(d,h),a.end(),a.stroke())};
-mxCellRenderer.registerShape("note",k);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d/2,.5*g,d,0);a.quadTo(.5*d,g/2,d,g);a.quadTo(d/2,.5*g,0,g);a.quadTo(.5*d,g/2,0,0);a.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.redrawPath=function(a,c,b,d,g,h){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));
-b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var f=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);h?"left"==f?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==f?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,g),a.lineTo(0,g),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",q);mxUtils.extend(r,mxActor);r.prototype.size=
+this.canvas.curveTo=mxUtils.bind(this,m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo)}function q(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function E(){mxActor.call(this)}function y(){mxActor.call(this)}function v(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function Q(){mxShape.call(this)}function F(){mxShape.call(this)}
+function I(){mxEllipse.call(this)}function M(){mxShape.call(this)}function z(){mxShape.call(this)}function B(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function O(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxShape.call(this)}function V(){mxShape.call(this)}function J(){mxCylinder.call(this)}function ha(){mxDoubleEllipse.call(this)}function na(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this);this.spacing=0}function ba(){mxArrowConnector.call(this);
+this.spacing=0}function N(){mxActor.call(this)}function H(){mxRectangleShape.call(this)}function U(){mxActor.call(this)}function L(){mxActor.call(this)}function P(){mxActor.call(this)}function R(){mxActor.call(this)}function ja(){mxActor.call(this)}function D(){mxActor.call(this)}function ea(){mxActor.call(this)}function X(){mxActor.call(this)}function Z(){mxActor.call(this)}function ca(){mxActor.call(this)}function fa(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
+function sa(){mxRhombus.call(this)}function la(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function ia(){mxActor.call(this)}function ga(){mxActor.call(this)}function da(){mxConnector.call(this)}function ya(a,c,b,d,g,f,h,l,m,t){h+=m;var C=d.clone();d.x-=g*(2*h+m);d.y-=f*(2*h+m);g*=h+m;f*=h+m;return function(){a.ellipse(C.x-g-h,C.y-f-h,2*h,2*h);t?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
+mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,d,g){var f=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),h=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),C=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,
+f);a.lineTo(d,g);a.lineTo(f,g);a.lineTo(0,g-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=h&&(a.setFillAlpha(Math.abs(h)),a.setFillColor(0>h?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-f,0),a.lineTo(d,f),a.lineTo(f,f),a.close(),a.fill()),0!=C&&(a.setFillAlpha(Math.abs(C)),a.setFillColor(0>C?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,g),a.lineTo(0,g-f),a.close(),a.fill()),a.begin(),a.moveTo(f,g),a.lineTo(f,f),a.lineTo(0,
+0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var wa=Math.tan(mxUtils.toRadians(30)),ra=(.5-wa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/wa);a.translate((d-c)/2,(g-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*
+c,c*ra);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ra)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(a,c,b,d,g,f){c=Math.min(d,g/(.5+wa));f?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-ra)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-ra)*c),a.lineTo(.5*c,(1-ra)*c)):(a.translate((d-c)/2,(g-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ra),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ra)*c),a.lineTo(0,
+.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",f);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,g,f){c=Math.min(g/2,Math.round(g/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),f||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),f||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),f||(a.stroke(),a.begin()),a.translate(0,-c);f||(a.moveTo(0,
+c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,g-c),a.curveTo(d,g+c/3,0,g+c/3,0,g-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,c,b,d,g){var f=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),
+h=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,g);a.lineTo(0,g);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=h&&(a.setFillAlpha(Math.abs(h)),a.setFillColor(0>h?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.end(),a.stroke())};
+mxCellRenderer.registerShape("note",k);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d/2,.5*g,d,0);a.quadTo(.5*d,g/2,d,g);a.quadTo(d/2,.5*g,0,g);a.quadTo(.5*d,g/2,0,0);a.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,d,g,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));
+b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var h=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);f?"left"==h?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==h?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,g),a.lineTo(0,g),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(r,mxActor);r.prototype.size=
30;r.prototype.isRoundable=function(){return!0};r.prototype.redrawPath=function(a,c,b,d,g){c=Math.max(0,Math.min(d,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,g),new mxPoint(0,g),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",r);mxUtils.extend(u,mxActor);u.prototype.size=.4;u.prototype.redrawPath=
function(a,c,b,d,g){c=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,g-c/2);a.quadTo(3*d/4,g-1.4*c,d/2,g-c/2);a.quadTo(d/4,g-c*(1-1.4),0,g-c/2);a.lineTo(0,c/2);a.close();a.end()};u.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==
mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,d)}return a};mxCellRenderer.registerShape("tape",u);mxUtils.extend(c,mxActor);c.prototype.size=.3;c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};c.prototype.redrawPath=function(a,c,b,d,g){c=g*Math.max(0,
@@ -2469,140 +2469,159 @@ Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(
function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,c,b,d,g){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,g),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,g)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",g);mxUtils.extend(h,mxActor);h.prototype.size=.2;h.prototype.isRoundable=function(){return!0};h.prototype.redrawPath=function(a,c,b,d,g){c=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
g),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,g)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",h);mxUtils.extend(l,mxActor);l.prototype.size=.5;l.prototype.redrawPath=function(a,c,b,d,g){a.setFillColor(null);c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,g/2),new mxPoint(0,g/2),new mxPoint(c,
-g/2),new mxPoint(c,g),new mxPoint(d,g)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",l);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(a,c,b,d,g){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,g);a.fillAndStroke();a.rect(2*c,0,c,g);a.fillAndStroke();a.rect(4*c,0,c,g);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",p);m.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
-c;this.firstX=a;this.firstY=c};m.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};m.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};m.prototype.curveTo=function(a,c,b,d,g,h){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=h};m.prototype.arcTo=function(a,c,b,d,
-g,h,f){this.originalArcTo.apply(this.canvas,arguments);this.lastX=h;this.lastY=f};m.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),g=Math.abs(c-this.lastY),h=Math.sqrt(d*d+g*g);if(2>h){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var f=Math.round(h/10),l=this.defaultVariation;5>f&&(f=5,l/=3);for(var ga=b(a-this.lastX)*d/f,b=b(c-this.lastY)*g/
-f,d=d/h,g=g/h,h=0;h<f;h++){var m=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,ga*h+this.lastX-m*g,b*h+this.lastY-m*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};m.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
+g/2),new mxPoint(c,g),new mxPoint(d,g)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",l);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,c,b,d,g){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,g);a.fillAndStroke();a.rect(2*c,0,c,g);a.fillAndStroke();a.rect(4*c,0,c,g);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);m.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=
+c;this.firstX=a;this.firstY=c};m.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};m.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};m.prototype.curveTo=function(a,c,b,d,g,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=f};m.prototype.arcTo=function(a,c,b,d,
+g,f,h){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=h};m.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),g=Math.abs(c-this.lastY),f=Math.sqrt(d*d+g*g);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var h=Math.round(f/10),C=this.defaultVariation;5>h&&(h=5,C/=3);for(var l=b(a-this.lastX)*d/h,b=b(c-this.lastY)*g/h,
+d=d/f,g=g/f,f=0;f<h;f++){var m=(Math.random()-.5)*C;this.originalLineTo.call(this.canvas,l*f+this.lastX-m*g,b*f+this.lastY-m*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};m.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};
var Ia=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new m(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ia.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ja=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==
-this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ja.apply(this,arguments)};var Ka=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,d,g){if(null==a.handJiggle)Ka.apply(this,arguments);else{var h=!0;null!=this.style&&(h="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(h||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)h||null!=this.fill&&this.fill!=mxConstants.NONE||
-(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?h=Math.min(d/2,Math.min(g/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,h=Math.min(d*h,g*h)),a.moveTo(c+h,b),a.lineTo(c+d-h,b),a.quadTo(c+d,b,c+d,b+h),a.lineTo(c+d,b+g-h),a.quadTo(c+d,b+g,c+d-h,b+g),a.lineTo(c+h,b+g),a.quadTo(c,b+g,c,b+g-h),
-a.lineTo(c,b+h),a.quadTo(c,b,c+h,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+g),a.lineTo(c,b+g),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var La=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,g){null==a.handJiggle&&La.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*g,b*g));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};t.prototype.paintForeground=
-function(a,c,b,d,g){var h=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,h=Math.max(h,Math.min(d*f,g*f));h=Math.round(h);a.begin();a.moveTo(c+h,b);a.lineTo(c+h,b+g);a.moveTo(c+d-h,b);a.lineTo(c+d-h,b+g);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",t);mxUtils.extend(x,
+this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ja.apply(this,arguments)};var Ka=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,d,g){if(null==a.handJiggle)Ka.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||
+(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(g/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,g*f)),a.moveTo(c+f,b),a.lineTo(c+d-f,b),a.quadTo(c+d,b,c+d,b+f),a.lineTo(c+d,b+g-f),a.quadTo(c+d,b+g,c+d-f,b+g),a.lineTo(c+f,b+g),a.quadTo(c,b+g,c,b+g-f),
+a.lineTo(c,b+f),a.quadTo(c,b,c+f,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+g),a.lineTo(c,b+g),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var La=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,g){null==a.handJiggle&&La.apply(this,arguments)};mxUtils.extend(q,mxRectangleShape);q.prototype.size=.1;q.prototype.isHtmlAllowed=function(){return!1};q.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*g,b*g));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};q.prototype.paintForeground=
+function(a,c,b,d,g){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*h,g*h));f=Math.round(f);a.begin();a.moveTo(c+f,b);a.lineTo(c+f,b+g);a.moveTo(c+d-f,b);a.lineTo(c+d-f,b+g);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",q);mxUtils.extend(x,
mxRectangleShape);x.prototype.paintBackground=function(a,c,b,d,g){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,g);a.fill()};x.prototype.paintForeground=function(a,c,b,d,g){};mxCellRenderer.registerShape("transparent",x);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable=
-function(){return!0};w.prototype.redrawPath=function(a,c,b,d,g){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var h=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
-this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,g-b),new mxPoint(Math.min(d,h+l),g-b),new mxPoint(f,g),new mxPoint(Math.max(0,h),g-b),new mxPoint(0,g-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(a,c,b,d,g){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(0,g),new mxPoint(c,g/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",D);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
+function(){return!0};w.prototype.redrawPath=function(a,c,b,d,g){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),h=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),C=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));
+this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,g-b),new mxPoint(Math.min(d,f+C),g-b),new mxPoint(h,g),new mxPoint(Math.max(0,f),g-b),new mxPoint(0,g-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(E,mxActor);E.prototype.size=.2;E.prototype.fixedSize=20;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath=function(a,c,b,d,g){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(0,g),new mxPoint(c,g/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",E);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
function(a,c,b,d,g){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*g),new mxPoint(d-c,g),new mxPoint(c,g),new mxPoint(0,.5*g)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(v,mxRectangleShape);v.prototype.isHtmlAllowed=function(){return!1};v.prototype.paintForeground=function(a,
-c,b,d,g){var h=Math.min(d/5,g/5)+1;a.begin();a.moveTo(c+d/2,b+h);a.lineTo(c+d/2,b+g-h);a.moveTo(c+h,b+g/2);a.lineTo(c+d-h,b+g/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",v);var Ea=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,g){Ea.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var h=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=h;b+=h;d-=2*h;g-=2*h;0<d&&0<g&&(a.setShadow(!1),Ea.apply(this,[a,c,b,d,g]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};A.prototype.paintForeground=function(a,c,b,d,g){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var h=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=h;b+=h;d-=2*h;g-=2*h;0<d&&0<g&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var h=0,f;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+
-h]];if(null!=f){var l=this.style["symbol"+h+"Align"],m=this.style["symbol"+h+"VerticalAlign"],ga=this.style["symbol"+h+"Width"],p=this.style["symbol"+h+"Height"],t=this.style["symbol"+h+"Spacing"]||0,v=this.style["symbol"+h+"VSpacing"]||t,y=this.style["symbol"+h+"ArcSpacing"];null!=y&&(y*=this.getArcSize(d+this.strokewidth,g+this.strokewidth),t+=y,v+=y);var y=c,w=b,y=l==mxConstants.ALIGN_CENTER?y+(d-ga)/2:l==mxConstants.ALIGN_RIGHT?y+(d-ga-t):y+t,w=m==mxConstants.ALIGN_MIDDLE?w+(g-p)/2:m==mxConstants.ALIGN_BOTTOM?
-w+(g-p-v):w+v;a.save();l=new f;l.style=this.style;f.prototype.paintVertexShape.call(l,a,y,w,ga,p);a.restore()}h++}while(null!=f)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",A);mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,c,b,d,g,h){h?(a.moveTo(0,0),a.lineTo(d/2,g/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,g),a.lineTo(0,g),a.close())};mxCellRenderer.registerShape("message",F);mxUtils.extend(P,mxShape);
-P.prototype.paintBackground=function(a,c,b,d,g){a.translate(c,b);a.ellipse(d/4,0,d/2,g/4);a.fillAndStroke();a.begin();a.moveTo(d/2,g/4);a.lineTo(d/2,2*g/3);a.moveTo(d/2,g/3);a.lineTo(0,g/3);a.moveTo(d/2,g/3);a.lineTo(d,g/3);a.moveTo(d/2,2*g/3);a.lineTo(0,g);a.moveTo(d/2,2*g/3);a.lineTo(d,g);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",P);mxUtils.extend(E,mxShape);E.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};E.prototype.paintBackground=function(a,
-c,b,d,g){a.translate(c,b);a.begin();a.moveTo(0,g/4);a.lineTo(0,3*g/4);a.end();a.stroke();a.begin();a.moveTo(0,g/2);a.lineTo(d/6,g/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,g);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",E);mxUtils.extend(H,mxEllipse);H.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+g);a.lineTo(c+7*d/8,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",H);mxUtils.extend(L,
-mxShape);L.prototype.paintVertexShape=function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,g);a.moveTo(0,0);a.lineTo(d,g);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",L);mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(3*d/8,g/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,g/8,d,7*g/8);a.fillAndStroke()};
+c,b,d,g){var f=Math.min(d/5,g/5)+1;a.begin();a.moveTo(c+d/2,b+f);a.lineTo(c+d/2,b+g-f);a.moveTo(c+f,b+g/2);a.lineTo(c+d-f,b+g/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",v);var Ea=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,g){Ea.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=f;b+=f;d-=2*f;g-=2*f;0<d&&0<g&&(a.setShadow(!1),Ea.apply(this,[a,c,b,d,g]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
+this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};A.prototype.paintForeground=function(a,c,b,d,g){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=f;b+=f;d-=2*f;g-=2*f;0<d&&0<g&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,h;do{h=mxCellRenderer.defaultShapes[this.style["symbol"+
+f]];if(null!=h){var C=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],t=this.style["symbol"+f+"Height"],q=this.style["symbol"+f+"Spacing"]||0,v=this.style["symbol"+f+"VSpacing"]||q,y=this.style["symbol"+f+"ArcSpacing"];null!=y&&(y*=this.getArcSize(d+this.strokewidth,g+this.strokewidth),q+=y,v+=y);var y=c,w=b,y=C==mxConstants.ALIGN_CENTER?y+(d-m)/2:C==mxConstants.ALIGN_RIGHT?y+(d-m-q):y+q,w=l==mxConstants.ALIGN_MIDDLE?w+(g-t)/2:l==mxConstants.ALIGN_BOTTOM?
+w+(g-t-v):w+v;a.save();C=new h;C.style=this.style;h.prototype.paintVertexShape.call(C,a,y,w,m,t);a.restore()}f++}while(null!=h)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",A);mxUtils.extend(G,mxCylinder);G.prototype.redrawPath=function(a,c,b,d,g,f){f?(a.moveTo(0,0),a.lineTo(d/2,g/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,g),a.lineTo(0,g),a.close())};mxCellRenderer.registerShape("message",G);mxUtils.extend(Q,mxShape);
+Q.prototype.paintBackground=function(a,c,b,d,g){a.translate(c,b);a.ellipse(d/4,0,d/2,g/4);a.fillAndStroke();a.begin();a.moveTo(d/2,g/4);a.lineTo(d/2,2*g/3);a.moveTo(d/2,g/3);a.lineTo(0,g/3);a.moveTo(d/2,g/3);a.lineTo(d,g/3);a.moveTo(d/2,2*g/3);a.lineTo(0,g);a.moveTo(d/2,2*g/3);a.lineTo(d,g);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",Q);mxUtils.extend(F,mxShape);F.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};F.prototype.paintBackground=function(a,
+c,b,d,g){a.translate(c,b);a.begin();a.moveTo(0,g/4);a.lineTo(0,3*g/4);a.end();a.stroke();a.begin();a.moveTo(0,g/2);a.lineTo(d/6,g/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,g);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",F);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+g);a.lineTo(c+7*d/8,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",I);mxUtils.extend(M,
+mxShape);M.prototype.paintVertexShape=function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,g);a.moveTo(0,0);a.lineTo(d,g);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",M);mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(3*d/8,g/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,g/8,d,7*g/8);a.fillAndStroke()};
z.prototype.paintForeground=function(a,c,b,d,g){a.begin();a.moveTo(3*d/8,g/8*1.1);a.lineTo(5*d/8,g/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",z);mxUtils.extend(B,mxRectangleShape);B.prototype.size=40;B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};B.prototype.paintBackground=function(a,c,b,d,
-g){var h=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"participant");null==f||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,d,h):(f=this.state.view.graph.cellRenderer.getShape(f),null!=f&&f!=B&&(f=new f,f.apply(this.state),a.save(),f.paintVertexShape(a,c,b,d,h),a.restore()));h<g&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+h),a.lineTo(c+d/2,b+g),a.end(),a.stroke())};B.prototype.paintForeground=function(a,
-c,b,d,g){var h=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(g,h))};mxCellRenderer.registerShape("umlLifeline",B);mxUtils.extend(J,mxShape);J.prototype.width=60;J.prototype.height=30;J.prototype.corner=10;J.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};J.prototype.paintBackground=function(a,c,b,d,g){var h=this.corner,f=Math.min(d,Math.max(h,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(g,Math.max(1.5*h,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(c,b,d,g),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
-mxConstants.NONE?(this.getGradientBounds(a,c,b,d,g),a.setGradient(this.fill,this.gradient,c,b,d,g,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f,b+Math.max(0,l-1.5*h));a.lineTo(c+Math.max(0,f-h),b+l);a.lineTo(c,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(c+f,b);a.lineTo(c+d,b);a.lineTo(c+d,b+g);a.lineTo(c,b+g);a.lineTo(c,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",J);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=B.prototype.size;
+g){var f=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),h=mxUtils.getValue(this.style,"participant");null==h||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,d,f):(h=this.state.view.graph.cellRenderer.getShape(h),null!=h&&h!=B&&(h=new h,h.apply(this.state),a.save(),h.paintVertexShape(a,c,b,d,f),a.restore()));f<g&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+f),a.lineTo(c+d/2,b+g),a.end(),a.stroke())};B.prototype.paintForeground=function(a,
+c,b,d,g){var f=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(g,f))};mxCellRenderer.registerShape("umlLifeline",B);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,c,b,d,g){var f=this.corner,h=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(g,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),C=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);C!=mxConstants.NONE&&(a.setFillColor(C),a.rect(c,b,d,g),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(a,c,b,d,g),a.setGradient(this.fill,this.gradient,c,b,d,g,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+h,b);a.lineTo(c+h,b+Math.max(0,l-1.5*f));a.lineTo(c+Math.max(0,h-f),b+l);a.lineTo(c,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(c+h,b);a.lineTo(c+d,b);a.lineTo(c+d,b+g);a.lineTo(c,b+g);a.lineTo(c,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=B.prototype.size;
null!=c&&(d=mxUtils.getValue(c.style,"size",d)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+d,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
mxPerimeter.BackbonePerimeter=function(a,c,b,d){d=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(d+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),
-a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",w.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var h=g.prototype.size;
-null!=c&&(h=mxUtils.getValue(c.style,"size",h));var f=a.x,l=a.y,m=a.width,p=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(h=p*Math.max(0,Math.min(1,h)),l=[new mxPoint(f,l),new mxPoint(f+m,l+h),new mxPoint(f+m,l+p),new mxPoint(f,l+p-h),new mxPoint(f,l)]):(h=m*Math.max(0,Math.min(1,h)),l=[new mxPoint(f+h,l),new mxPoint(f+m,l),new mxPoint(f+m-h,l+p),new mxPoint(f,
-l+p),new mxPoint(f+h,l)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);d&&(b.x<f||b.x>f+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var g=h.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));var f=a.x,l=a.y,m=a.width,p=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-c==mxConstants.DIRECTION_EAST?(g=m*Math.max(0,Math.min(1,g)),l=[new mxPoint(f+g,l),new mxPoint(f+m-g,l),new mxPoint(f+m,l+p),new mxPoint(f,l+p),new mxPoint(f+g,l)]):c==mxConstants.DIRECTION_WEST?(g=m*Math.max(0,Math.min(1,g)),l=[new mxPoint(f,l),new mxPoint(f+m,l),new mxPoint(f+m-g,l+p),new mxPoint(f+g,l+p),new mxPoint(f,l)]):c==mxConstants.DIRECTION_NORTH?(g=p*Math.max(0,Math.min(1,g)),l=[new mxPoint(f,l+g),new mxPoint(f+m,l),new mxPoint(f+m,l+p),new mxPoint(f,l+p-g),new mxPoint(f,l+g)]):(g=p*Math.max(0,
-Math.min(1,g)),l=[new mxPoint(f,l),new mxPoint(f+m,l+g),new mxPoint(f+m,l+p-g),new mxPoint(f,l+p),new mxPoint(f,l)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);d&&(b.x<f||b.x>f+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var g="0"!=mxUtils.getValue(c.style,"fixedSize","0"),h=g?D.prototype.fixedSize:D.prototype.size;null!=c&&(h=mxUtils.getValue(c.style,
-"size",h));var f=a.x,l=a.y,m=a.width,p=a.height,t=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(g=g?Math.max(0,Math.min(m,h)):m*Math.max(0,Math.min(1,h)),l=[new mxPoint(f,l),new mxPoint(f+m-g,l),new mxPoint(f+m,a),new mxPoint(f+m-g,l+p),new mxPoint(f,l+p),new mxPoint(f+g,a),new mxPoint(f,l)]):c==mxConstants.DIRECTION_WEST?(g=g?Math.max(0,Math.min(m,h)):m*Math.max(0,
-Math.min(1,h)),l=[new mxPoint(f+g,l),new mxPoint(f+m,l),new mxPoint(f+m-g,a),new mxPoint(f+m,l+p),new mxPoint(f+g,l+p),new mxPoint(f,a),new mxPoint(f+g,l)]):c==mxConstants.DIRECTION_NORTH?(g=g?Math.max(0,Math.min(p,h)):p*Math.max(0,Math.min(1,h)),l=[new mxPoint(f,l+g),new mxPoint(t,l),new mxPoint(f+m,l+g),new mxPoint(f+m,l+p),new mxPoint(t,l+p-g),new mxPoint(f,l+p),new mxPoint(f,l+g)]):(g=g?Math.max(0,Math.min(p,h)):p*Math.max(0,Math.min(1,h)),l=[new mxPoint(f,l),new mxPoint(t,l+g),new mxPoint(f+
-m,l),new mxPoint(f+m,l+p-g),new mxPoint(t,l+p),new mxPoint(f,l+p-g),new mxPoint(f,l)]);t=new mxPoint(t,a);d&&(b.x<f||b.x>f+m?t.y=b.y:t.x=b.x);return mxUtils.getPerimeterPoint(l,t,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var g=y.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));var h=a.x,f=a.y,l=a.width,m=a.height,p=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(g=m*Math.max(0,Math.min(1,g)),f=[new mxPoint(p,f),new mxPoint(h+l,f+g),new mxPoint(h+l,f+m-g),new mxPoint(p,f+m),new mxPoint(h,f+m-g),new mxPoint(h,f+g),new mxPoint(p,f)]):(g=l*Math.max(0,Math.min(1,g)),f=[new mxPoint(h+g,f),new mxPoint(h+l-g,f),new mxPoint(h+l,a),new mxPoint(h+l-g,f+m),new mxPoint(h+g,f+m),new mxPoint(h,a),new mxPoint(h+g,f)]);p=new mxPoint(p,a);d&&(b.x<h||b.x>h+
-l?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(f,p,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,c,b,d,g){var h=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-h)/2,0,h,h);a.fillAndStroke();a.begin();a.moveTo(d/2,h);a.lineTo(d/2,g);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",N);mxUtils.extend(R,mxShape);R.prototype.size=
-10;R.prototype.inset=2;R.prototype.paintBackground=function(a,c,b,d,g){var h=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,h+f);a.lineTo(d/2,g);a.end();a.stroke();a.begin();a.moveTo((d-h)/2-f,h/2);a.quadTo((d-h)/2-f,h+f,d/2,h+f);a.quadTo((d+h)/2+f,h+f,(d+h)/2+f,h/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(V,mxShape);V.prototype.paintBackground=
-function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",V);mxUtils.extend(U,mxShape);U.prototype.inset=2;U.prototype.paintBackground=function(a,c,b,d,g){var h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,h,d-2*h,g-2*h);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d/2,g);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
-U);mxUtils.extend(I,mxCylinder);I.prototype.jettyWidth=32;I.prototype.jettyHeight=12;I.prototype.redrawPath=function(a,c,b,d,g,h){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=f/2;var f=b+f/2,l=.3*g-c/2,m=.7*g-c/2;h?(a.moveTo(b,l),a.lineTo(f,l),a.lineTo(f,l+c),a.lineTo(b,l+c),a.moveTo(b,m),a.lineTo(f,m),a.lineTo(f,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,g),a.lineTo(b,g),
-a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",I);mxUtils.extend(ha,mxDoubleEllipse);ha.prototype.outerStroke=!0;ha.prototype.paintVertexShape=function(a,c,b,d,g){var h=Math.min(4,Math.min(d/5,g/5));0<d&&0<g&&(a.ellipse(c+h,b+h,d-2*h,g-2*h),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,g),a.stroke())};mxCellRenderer.registerShape("endState",
-ha);mxUtils.extend(na,ha);na.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",na);mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=4;X.prototype.isOpenEnded=function(){return!0};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};X.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",X);mxUtils.extend(aa,mxArrowConnector);aa.prototype.defaultWidth=10;
-aa.prototype.defaultArrowWidth=20;aa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};aa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",aa);mxUtils.extend(M,mxActor);
-M.prototype.size=30;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,g),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,g)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",M);mxUtils.extend(G,mxRectangleShape);G.prototype.dx=20;G.prototype.dy=20;G.prototype.isHtmlAllowed=
-function(){return!1};G.prototype.paintForeground=function(a,c,b,d,g){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var h=0;if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,h=Math.max(h,Math.min(d*f,g*f));f=Math.max(h,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));h=Math.max(h,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+h);a.lineTo(c+d,b+h);
-a.end();a.stroke();a.begin();a.moveTo(c+f,b);a.lineTo(c+f,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",G);mxUtils.extend(T,mxActor);T.prototype.dx=20;T.prototype.dy=20;T.prototype.redrawPath=function(a,c,b,d,g){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,g),new mxPoint(0,g)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("corner",T);mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.lineTo(0,g);a.end();a.moveTo(d,0);a.lineTo(d,g);a.end();a.moveTo(0,g/2);a.lineTo(d,g/2);a.end()};mxCellRenderer.registerShape("crossbar",K);mxUtils.extend(O,mxActor);O.prototype.dx=20;O.prototype.dy=
-20;O.prototype.redrawPath=function(a,c,b,d,g){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,g),new mxPoint((d-c)/2,g),new mxPoint((d-
-c)/2,b),new mxPoint(0,b)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("tee",O);mxUtils.extend(S,mxActor);S.prototype.arrowWidth=.3;S.prototype.arrowSize=.2;S.prototype.redrawPath=function(a,c,b,d,g){var h=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(g-h)/2;var h=b+h,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(d-c,h),new mxPoint(0,h)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("singleArrow",S);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,b,d,g){var h=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize))));
-b=(g-h)/2;var h=b+h,f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,g/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(d-c,h),new mxPoint(c,h),new mxPoint(c,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ja);mxUtils.extend(C,mxActor);C.prototype.size=.1;C.prototype.redrawPath=function(a,c,b,d,g){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,g/2,d,g);a.lineTo(c,g);a.quadTo(c-2*c,g/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",C);mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.close();a.end()};mxCellRenderer.registerShape("or",da);mxUtils.extend(W,mxActor);W.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.quadTo(d/2,g/2,0,0);a.close();
-a.end()};mxCellRenderer.registerShape("xor",W);mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d/2,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,g),new mxPoint(0,g),new mxPoint(0,.8*c)],this.isRounded,b,!0);
-a.end()};mxCellRenderer.registerShape("loopLimit",Y);mxUtils.extend(ba,mxActor);ba.prototype.size=.375;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(a,c,b,d,g){c=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,g-c),new mxPoint(d/2,g),new mxPoint(0,g-c)],this.isRounded,b,!0);a.end()};
-mxCellRenderer.registerShape("offPageConnector",ba);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/2,b+g);a.lineTo(c+d,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+g/2);a.lineTo(c+d,b+g/2);
-a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Z);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*g);a.lineTo(c+.855*d,b+.855*g);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*g);a.lineTo(c+.145*d,b+.855*g);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);
-mxUtils.extend(sa,mxRhombus);sa.prototype.paintVertexShape=function(a,c,b,d,g){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+g/2);a.lineTo(c+d,b+g/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",sa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,d,g){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+g/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+g);a.lineTo(c+d,b+g);a.lineTo(c+d/2,b+g/2);
-a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",la);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(a,c,b,d,g){var h=b+g-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+g);a.moveTo(c,h);a.lineTo(c+10,h-5);a.moveTo(c,h);a.lineTo(c+10,h+5);a.moveTo(c,h);a.lineTo(c+d,h);a.moveTo(c+d,b);a.lineTo(c+d,b+g);a.moveTo(c+d,h);a.lineTo(c+d-10,h-5);a.moveTo(c+d,h);a.lineTo(c+d-10,h+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",oa);mxUtils.extend(va,mxEllipse);
+a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",w.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var f=g.prototype.size;
+null!=c&&(f=mxUtils.getValue(c.style,"size",f));var h=a.x,l=a.y,m=a.width,C=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=C*Math.max(0,Math.min(1,f)),l=[new mxPoint(h,l),new mxPoint(h+m,l+f),new mxPoint(h+m,l+C),new mxPoint(h,l+C-f),new mxPoint(h,l)]):(f=m*Math.max(0,Math.min(1,f)),l=[new mxPoint(h+f,l),new mxPoint(h+m,l),new mxPoint(h+m-f,l+C),new mxPoint(h,
+l+C),new mxPoint(h+f,l)]);C=a.getCenterX();a=a.getCenterY();a=new mxPoint(C,a);d&&(b.x<h||b.x>h+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var g=h.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));var f=a.x,l=a.y,m=a.width,C=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
+c==mxConstants.DIRECTION_EAST?(g=m*Math.max(0,Math.min(1,g)),l=[new mxPoint(f+g,l),new mxPoint(f+m-g,l),new mxPoint(f+m,l+C),new mxPoint(f,l+C),new mxPoint(f+g,l)]):c==mxConstants.DIRECTION_WEST?(g=m*Math.max(0,Math.min(1,g)),l=[new mxPoint(f,l),new mxPoint(f+m,l),new mxPoint(f+m-g,l+C),new mxPoint(f+g,l+C),new mxPoint(f,l)]):c==mxConstants.DIRECTION_NORTH?(g=C*Math.max(0,Math.min(1,g)),l=[new mxPoint(f,l+g),new mxPoint(f+m,l),new mxPoint(f+m,l+C),new mxPoint(f,l+C-g),new mxPoint(f,l+g)]):(g=C*Math.max(0,
+Math.min(1,g)),l=[new mxPoint(f,l),new mxPoint(f+m,l+g),new mxPoint(f+m,l+C-g),new mxPoint(f,l+C),new mxPoint(f,l)]);C=a.getCenterX();a=a.getCenterY();a=new mxPoint(C,a);d&&(b.x<f||b.x>f+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var g="0"!=mxUtils.getValue(c.style,"fixedSize","0"),f=g?E.prototype.fixedSize:E.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,
+"size",f));var h=a.x,l=a.y,m=a.width,C=a.height,t=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(g=g?Math.max(0,Math.min(m,f)):m*Math.max(0,Math.min(1,f)),l=[new mxPoint(h,l),new mxPoint(h+m-g,l),new mxPoint(h+m,a),new mxPoint(h+m-g,l+C),new mxPoint(h,l+C),new mxPoint(h+g,a),new mxPoint(h,l)]):c==mxConstants.DIRECTION_WEST?(g=g?Math.max(0,Math.min(m,f)):m*Math.max(0,
+Math.min(1,f)),l=[new mxPoint(h+g,l),new mxPoint(h+m,l),new mxPoint(h+m-g,a),new mxPoint(h+m,l+C),new mxPoint(h+g,l+C),new mxPoint(h,a),new mxPoint(h+g,l)]):c==mxConstants.DIRECTION_NORTH?(g=g?Math.max(0,Math.min(C,f)):C*Math.max(0,Math.min(1,f)),l=[new mxPoint(h,l+g),new mxPoint(t,l),new mxPoint(h+m,l+g),new mxPoint(h+m,l+C),new mxPoint(t,l+C-g),new mxPoint(h,l+C),new mxPoint(h,l+g)]):(g=g?Math.max(0,Math.min(C,f)):C*Math.max(0,Math.min(1,f)),l=[new mxPoint(h,l),new mxPoint(t,l+g),new mxPoint(h+
+m,l),new mxPoint(h+m,l+C-g),new mxPoint(t,l+C),new mxPoint(h,l+C-g),new mxPoint(h,l)]);t=new mxPoint(t,a);d&&(b.x<h||b.x>h+m?t.y=b.y:t.x=b.x);return mxUtils.getPerimeterPoint(l,t,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var g=y.prototype.size;null!=c&&(g=mxUtils.getValue(c.style,"size",g));var f=a.x,h=a.y,l=a.width,m=a.height,C=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(g=m*Math.max(0,Math.min(1,g)),h=[new mxPoint(C,h),new mxPoint(f+l,h+g),new mxPoint(f+l,h+m-g),new mxPoint(C,h+m),new mxPoint(f,h+m-g),new mxPoint(f,h+g),new mxPoint(C,h)]):(g=l*Math.max(0,Math.min(1,g)),h=[new mxPoint(f+g,h),new mxPoint(f+l-g,h),new mxPoint(f+l,a),new mxPoint(f+l-g,h+m),new mxPoint(f+g,h+m),new mxPoint(f,a),new mxPoint(f+g,h)]);C=new mxPoint(C,a);d&&(b.x<f||b.x>f+
+l?C.y=b.y:C.x=b.x);return mxUtils.getPerimeterPoint(h,C,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,c,b,d,g){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,g);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(T,mxShape);T.prototype.size=
+10;T.prototype.inset=2;T.prototype.paintBackground=function(a,c,b,d,g){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,f+h);a.lineTo(d/2,g);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-h,f/2);a.quadTo((d-f)/2-h,f+h,d/2,f+h);a.quadTo((d+f)/2+h,f+h,(d+f)/2+h,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",T);mxUtils.extend(W,mxShape);W.prototype.paintBackground=
+function(a,c,b,d,g){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",W);mxUtils.extend(V,mxShape);V.prototype.inset=2;V.prototype.paintBackground=function(a,c,b,d,g){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,f,d-2*f,g-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d/2,g);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
+V);mxUtils.extend(J,mxCylinder);J.prototype.jettyWidth=32;J.prototype.jettyHeight=12;J.prototype.redrawPath=function(a,c,b,d,g,f){var h=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=h/2;var h=b+h/2,l=.3*g-c/2,m=.7*g-c/2;f?(a.moveTo(b,l),a.lineTo(h,l),a.lineTo(h,l+c),a.lineTo(b,l+c),a.moveTo(b,m),a.lineTo(h,m),a.lineTo(h,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,g),a.lineTo(b,g),
+a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",J);mxUtils.extend(ha,mxDoubleEllipse);ha.prototype.outerStroke=!0;ha.prototype.paintVertexShape=function(a,c,b,d,g){var f=Math.min(4,Math.min(d/5,g/5));0<d&&0<g&&(a.ellipse(c+f,b+f,d-2*f,g-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,g),a.stroke())};mxCellRenderer.registerShape("endState",
+ha);mxUtils.extend(na,ha);na.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",na);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=4;Y.prototype.isOpenEnded=function(){return!0};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Y.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Y);mxUtils.extend(ba,mxArrowConnector);ba.prototype.defaultWidth=10;
+ba.prototype.defaultArrowWidth=20;ba.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ba.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ba.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ba);mxUtils.extend(N,mxActor);
+N.prototype.size=30;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,g),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,g)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",N);mxUtils.extend(H,mxRectangleShape);H.prototype.dx=20;H.prototype.dy=20;H.prototype.isHtmlAllowed=
+function(){return!1};H.prototype.paintForeground=function(a,c,b,d,g){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*h,g*h));h=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);
+a.end();a.stroke();a.begin();a.moveTo(c+h,b);a.lineTo(c+h,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",H);mxUtils.extend(U,mxActor);U.prototype.dx=20;U.prototype.dy=20;U.prototype.redrawPath=function(a,c,b,d,g){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,g),new mxPoint(0,g)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",U);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.lineTo(0,g);a.end();a.moveTo(d,0);a.lineTo(d,g);a.end();a.moveTo(0,g/2);a.lineTo(d,g/2);a.end()};mxCellRenderer.registerShape("crossbar",L);mxUtils.extend(P,mxActor);P.prototype.dx=20;P.prototype.dy=
+20;P.prototype.redrawPath=function(a,c,b,d,g){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,g),new mxPoint((d-c)/2,g),new mxPoint((d-
+c)/2,b),new mxPoint(0,b)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",P);mxUtils.extend(R,mxActor);R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,c,b,d,g){var f=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(g-f)/2;var f=b+f,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(d-c,f),new mxPoint(0,f)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("singleArrow",R);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,c,b,d,g){var f=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));
+b=(g-f)/2;var f=b+f,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,g/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,g/2),new mxPoint(d-c,g),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(c,g)],this.isRounded,h,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ja);mxUtils.extend(D,mxActor);D.prototype.size=.1;D.prototype.redrawPath=function(a,c,b,d,g){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,g/2,d,g);a.lineTo(c,g);a.quadTo(c-2*c,g/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",D);mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.close();a.end()};mxCellRenderer.registerShape("or",ea);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,c,b,d,g){a.moveTo(0,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,0,g);a.quadTo(d/2,g/2,0,0);a.close();
+a.end()};mxCellRenderer.registerShape("xor",X);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d/2,Math.min(g,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,g),new mxPoint(0,g),new mxPoint(0,.8*c)],this.isRounded,b,!0);
+a.end()};mxCellRenderer.registerShape("loopLimit",Z);mxUtils.extend(ca,mxActor);ca.prototype.size=.375;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(a,c,b,d,g){c=g*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,g-c),new mxPoint(d/2,g),new mxPoint(0,g-c)],this.isRounded,b,!0);a.end()};
+mxCellRenderer.registerShape("offPageConnector",ca);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/2,b+g);a.lineTo(c+d,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",fa);mxUtils.extend(aa,mxEllipse);aa.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+g/2);a.lineTo(c+d,b+g/
+2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+g);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",aa);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*g);a.lineTo(c+.855*d,b+.855*g);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*g);a.lineTo(c+.145*d,b+.855*g);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",
+qa);mxUtils.extend(sa,mxRhombus);sa.prototype.paintVertexShape=function(a,c,b,d,g){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+g/2);a.lineTo(c+d,b+g/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",sa);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,d,g){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+g/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+g);a.lineTo(c+d,b+g);a.lineTo(c+d/2,b+
+g/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",la);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(a,c,b,d,g){var f=b+g-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+g);a.moveTo(c,f);a.lineTo(c+10,f-5);a.moveTo(c,f);a.lineTo(c+10,f+5);a.moveTo(c,f);a.lineTo(c+d,f);a.moveTo(c+d,b);a.lineTo(c+d,b+g);a.moveTo(c+d,f);a.lineTo(c+d-10,f-5);a.moveTo(c+d,f);a.lineTo(c+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",oa);mxUtils.extend(va,mxEllipse);
va.prototype.paintVertexShape=function(a,c,b,d,g){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,b,d,g),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+d,b+g):a.moveTo(c+d,b+g),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+g):a.moveTo(c,b+g),"1"==mxUtils.getValue(this.style,
"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",va);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a,c,b,d,g){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,b+g)):(a.moveTo(c,b+g/2),a.lineTo(c+d,b+g/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ka);mxUtils.extend(ta,mxActor);
-ta.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d-c,g);a.lineTo(0,g);a.close();a.end()};mxCellRenderer.registerShape("delay",ta);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(g,d);var h=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(g-h)/2;b=c+h;var f=(d-h)/2,h=f+h;a.moveTo(0,c);a.lineTo(f,c);a.lineTo(f,0);a.lineTo(h,0);a.lineTo(h,
-c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(h,b);a.lineTo(h,g);a.lineTo(f,g);a.lineTo(f,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ia);mxUtils.extend(fa,mxActor);fa.prototype.size=.25;fa.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,g/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d-c,g);a.lineTo(b,g);a.close();a.end()};mxCellRenderer.registerShape("display",
-fa);mxUtils.extend(ca,mxConnector);ca.prototype.origPaintEdgeShape=ca.prototype.paintEdgeShape;ca.prototype.paintEdgeShape=function(a,c,b){for(var d=[],g=0;g<c.length;g++)d.push(mxUtils.clone(c[g]));var g=a.state.dashed,h=a.state.fixDash;ca.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(g,h),ca.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};
-mxCellRenderer.registerShape("filledEdge",ca);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,d,g,h,f,l,m,p){var t=g*(f+m+1),v=h*(f+m+1);return function(){a.begin();
-a.moveTo(d.x-t/2-v/2,d.y-v/2+t/2);a.lineTo(d.x+v/2-3*t/2,d.y-3*v/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,g,h,f,l,m,p){var t=g*(f+m+1),v=h*(f+m+1);return function(){a.begin();a.moveTo(d.x-t/2-v/2,d.y-v/2+t/2);a.lineTo(d.x+v/2-3*t/2,d.y-3*v/2-t/2);a.moveTo(d.x-t/2+v/2,d.y-v/2-t/2);a.lineTo(d.x-v/2-3*t/2,d.y-3*v/2+t/2);a.stroke()}});mxMarker.addMarker("circle",ya);mxMarker.addMarker("circlePlus",function(a,c,b,d,g,h,f,l,m,p){var t=d.clone(),v=ya.apply(this,arguments),y=g*(f+
-2*m),w=h*(f+2*m);return function(){v.apply(this,arguments);a.begin();a.moveTo(t.x-g*m,t.y-h*m);a.lineTo(t.x-2*y+g*m,t.y-2*w+h*m);a.moveTo(t.x-y-w+h*m,t.y-w+y-g*m);a.lineTo(t.x+w-y-h*m,t.y-w-y+g*m);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,d,g,h,f,l,m,p){c=g*m*1.118;b=h*m*1.118;g*=f+m;h*=f+m;var t=d.clone();t.x-=c;t.y-=b;d.x+=1*-g-c;d.y+=1*-h-b;return function(){a.begin();a.moveTo(t.x,t.y);l?a.lineTo(t.x-g-h/2,t.y-h+g/2):a.lineTo(t.x+h/2-g,t.y-h-g/2);a.lineTo(t.x-g,t.y-h);a.close();p?
-a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,g,h,f,l,m,p,t){h*=l+p;f*=l+p;var v=g.clone();return function(){c.begin();c.moveTo(v.x,v.y);m?c.lineTo(v.x-h-f/a,v.y-f+h/a):c.lineTo(v.x+f/a-h,v.y-f-h/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Fa=function(a,c,b){return ua(a,["width"],c,function(c,d,g,h,f){f=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(h.x+d*c/4+g*f/2,h.y+g*c/4-d*f/2)},function(c,d,g,h,f,
-l){c=Math.sqrt(mxUtils.ptSegDistSq(h.x,h.y,f.x,f.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ua=function(a,c,b,d,g){return Q(a,c,function(c){var g=a.absolutePoints,h=g.length-1;c=a.view.translate;var f=a.view.scale,l=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,p=Math.sqrt(h*h+m*m),l=d.call(this,p,h/p,m/p,l,g);return new mxPoint(l.x/f-c.x,l.y/f-c.y)},function(c,d,h){var f=a.absolutePoints,l=f.length-1;c=a.view.translate;var m=a.view.scale,p=b?f[0]:f[l],f=b?f[1]:f[l-1],l=f.x-p.x,
-t=f.y-p.y,v=Math.sqrt(l*l+t*t);d.x=(d.x+c.x)*m;d.y=(d.y+c.y)*m;g.call(this,v,l/v,t/v,p,f,d,h)})},pa=function(a){return function(c){return[Q(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",S.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",S.prototype.arrowSize)));return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,
-Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Da=function(a,c,b){return function(d){var g=[Q(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,
-!1)&&g.push(ma(d));return g}},za=function(a,c,b,d,g){b=null!=b?b:1;return function(h){var f=[Q(h,["size"],function(c){var b=null!=g?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",b?g:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var f=null!=g?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=f?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));f&&!mxEvent.isAltDown(d.getEvent())&&
-(a=h.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ma(h));return f}},Ga=function(a){return function(c){var b=[Q(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
-!1)&&b.push(ma(c));return b}},xa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c}},ma=function(a,c){return Q(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,g),b.y+d)}g=Math.max(0,parseFloat(mxUtils.getValue(a.style,
+ta.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d-c,g);a.lineTo(0,g);a.close();a.end()};mxCellRenderer.registerShape("delay",ta);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(g,d);var f=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(g-f)/2;b=c+f;var h=(d-f)/2,f=h+f;a.moveTo(0,c);a.lineTo(h,c);a.lineTo(h,0);a.lineTo(f,0);a.lineTo(f,
+c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(f,b);a.lineTo(f,g);a.lineTo(h,g);a.lineTo(h,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ia);mxUtils.extend(ga,mxActor);ga.prototype.size=.25;ga.prototype.redrawPath=function(a,c,b,d,g){c=Math.min(d,g/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,g/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,g/2);a.quadTo(d,g,d-c,g);a.lineTo(b,g);a.close();a.end()};mxCellRenderer.registerShape("display",
+ga);mxUtils.extend(da,mxConnector);da.prototype.origPaintEdgeShape=da.prototype.paintEdgeShape;da.prototype.paintEdgeShape=function(a,c,b){for(var d=[],g=0;g<c.length;g++)d.push(mxUtils.clone(c[g]));var g=a.state.dashed,f=a.state.fixDash;da.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(g,f),da.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};
+mxCellRenderer.registerShape("filledEdge",da);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,d,g,f,h,l,m,t){var q=g*(h+m+1),v=f*(h+m+1);return function(){a.begin();
+a.moveTo(d.x-q/2-v/2,d.y-v/2+q/2);a.lineTo(d.x+v/2-3*q/2,d.y-3*v/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,g,f,h,l,m,t){var q=g*(h+m+1),v=f*(h+m+1);return function(){a.begin();a.moveTo(d.x-q/2-v/2,d.y-v/2+q/2);a.lineTo(d.x+v/2-3*q/2,d.y-3*v/2-q/2);a.moveTo(d.x-q/2+v/2,d.y-v/2-q/2);a.lineTo(d.x-v/2-3*q/2,d.y-3*v/2+q/2);a.stroke()}});mxMarker.addMarker("circle",ya);mxMarker.addMarker("circlePlus",function(a,c,b,d,g,f,h,l,m,t){var q=d.clone(),v=ya.apply(this,arguments),y=g*(h+
+2*m),w=f*(h+2*m);return function(){v.apply(this,arguments);a.begin();a.moveTo(q.x-g*m,q.y-f*m);a.lineTo(q.x-2*y+g*m,q.y-2*w+f*m);a.moveTo(q.x-y-w+f*m,q.y-w+y-g*m);a.lineTo(q.x+w-y-f*m,q.y-w-y+g*m);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,d,g,f,h,l,m,t){c=g*m*1.118;b=f*m*1.118;g*=h+m;f*=h+m;var q=d.clone();q.x-=c;q.y-=b;d.x+=1*-g-c;d.y+=1*-f-b;return function(){a.begin();a.moveTo(q.x,q.y);l?a.lineTo(q.x-g-f/2,q.y-f+g/2):a.lineTo(q.x+f/2-g,q.y-f-g/2);a.lineTo(q.x-g,q.y-f);a.close();t?
+a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,g,f,h,l,m,q,t){f*=l+q;h*=l+q;var v=g.clone();return function(){c.begin();c.moveTo(v.x,v.y);m?c.lineTo(v.x-f-h/a,v.y-h+f/a):c.lineTo(v.x+h/a-f,v.y-h-f/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Fa=function(a,c,b){return ua(a,["width"],c,function(c,d,g,f,h){h=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(f.x+d*c/4+g*h/2,f.y+g*c/4-d*h/2)},function(c,d,g,f,h,
+l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,h.x,h.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ua=function(a,c,b,d,g){return S(a,c,function(c){var g=a.absolutePoints,f=g.length-1;c=a.view.translate;var h=a.view.scale,l=b?g[0]:g[f],g=b?g[1]:g[f-1],f=g.x-l.x,m=g.y-l.y,q=Math.sqrt(f*f+m*m),l=d.call(this,q,f/q,m/q,l,g);return new mxPoint(l.x/h-c.x,l.y/h-c.y)},function(c,d,f){var h=a.absolutePoints,l=h.length-1;c=a.view.translate;var m=a.view.scale,q=b?h[0]:h[l],h=b?h[1]:h[l-1],l=h.x-q.x,
+t=h.y-q.y,v=Math.sqrt(l*l+t*t);d.x=(d.x+c.x)*m;d.y=(d.y+c.y)*m;g.call(this,v,l/v,t/v,q,h,d,f)})},pa=function(a){return function(c){return[S(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,
+Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Da=function(a,c,b){return function(d){var g=[S(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,
+!1)&&g.push(ma(d));return g}},za=function(a,c,b,d,g){b=null!=b?b:1;return function(f){var h=[S(f,["size"],function(c){var b=null!=g?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",b?g:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var h=null!=g?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=h?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));h&&!mxEvent.isAltDown(d.getEvent())&&
+(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(ma(f));return h}},Ga=function(a){return function(c){var b=[S(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
+!1)&&b.push(ma(c));return b}},xa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c}},ma=function(a,c){return S(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,g),b.y+d)}g=Math.max(0,parseFloat(mxUtils.getValue(a.style,
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*g),b.y+d)},function(c,b,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},
-Q=function(a,c,b,d,g,h){var f=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);f.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};f.getPosition=b;f.setPosition=d;f.ignoreGrid=null!=g?g:!0;if(h){var l=f.positionChanged;f.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return f},Aa={link:function(a){return[Fa(a,!0,10),Fa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,
-mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,g,h){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;h=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+b*(h+a.shape.strokewidth*a.view.scale)+d*c/2,g.y+d*(h+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,g,h,f,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(h.x,
-h.y,f.x,f.y,l.x,l.y));d=mxUtils.ptLineDist(h.x,h.y,h.x+g,h.y-d,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=
-a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,g,h){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;h=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+b*(h+a.shape.strokewidth*a.view.scale)+d*c/2,g.y+d*(h+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,g,h,f,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(h.x,h.y,f.x,
-f.y,l.x,l.y));d=mxUtils.ptLineDist(h.x,h.y,h.x+g,h.y-d,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<
-c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,g,h){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;h=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(g.x+b*(h+a.shape.strokewidth*a.view.scale)-d*c/2,g.y+d*(h+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,g,h,f,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(h.x,h.y,f.x,f.y,l.x,l.y));d=mxUtils.ptLineDist(h.x,h.y,h.x+g,h.y-d,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);
-mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,g,h){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;h=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+
-b*(h+a.shape.strokewidth*a.view.scale)-d*c/2,g.y+d*(h+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,g,h,f,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(h.x,h.y,f.x,f.y,l.x,l.y));d=mxUtils.ptLineDist(h.x,h.y,h.x+g,h.y-d,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],
-a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[Q(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,
+S=function(a,c,b,d,g,f){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};h.getPosition=b;h.setPosition=d;h.ignoreGrid=null!=g?g:!0;if(f){var l=h.positionChanged;h.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},Aa={link:function(a){return[Fa(a,!0,10),Fa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,
+mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,g,f){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+b*(f+a.shape.strokewidth*a.view.scale)+d*c/2,g.y+d*(f+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,g,f,h,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,
+f.y,h.x,h.y,l.x,l.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+g,f.y-d,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=
+a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,g,f){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+b*(f+a.shape.strokewidth*a.view.scale)+d*c/2,g.y+d*(f+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,g,f,h,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,h.x,
+h.y,l.x,l.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+g,f.y-d,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<
+c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,g,f){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
+5)*a.view.scale;return new mxPoint(g.x+b*(f+a.shape.strokewidth*a.view.scale)-d*c/2,g.y+d*(f+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,g,f,h,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,h.x,h.y,l.x,l.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+g,f.y-d,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);
+mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,g,f){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(g.x+
+b*(f+a.shape.strokewidth*a.view.scale)-d*c/2,g.y+d*(f+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,g,f,h,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,h.x,h.y,l.x,l.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+g,f.y-d,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],
+a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[S(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,
mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=
-parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ma(a,b/2))}return c},label:xa(),ext:xa(),rectangle:xa(),triangle:xa(),rhombus:xa(),umlLifeline:function(a){return[Q(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[Q(a,
-["width","height"],function(a){var c=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),b=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},
-process:function(a){var c=[Q(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},cross:function(a){return[Q(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",ia.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[Q(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[Q(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",M.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},dataStorage:function(a){return[Q(a,
-["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[Q(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
-mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),Q(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+
-c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),Q(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-
-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},internalStorage:function(a){var c=[Q(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",G.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
-G.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},corner:function(a){return[Q(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
-T.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[Q(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",O.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",O.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=
-Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:pa(1),doubleArrow:pa(.5),folder:function(a){return[Q(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==
-mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[Q(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));
-return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[Q(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[Q(a,["size"],function(a){var c=
-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:za(D.prototype.size,!0,null,!0,D.prototype.fixedSize),hexagon:za(y.prototype.size,!0,.5,!0),curlyBracket:za(l.prototype.size,!1),display:za(fa.prototype.size,!1),cube:Da(1,a.prototype.size,!1),card:Da(.5,r.prototype.size,!0),loopLimit:Da(.5,Y.prototype.size,
-!0),trapezoid:Ga(.5),parallelogram:Ga(1)};Graph.createHandle=Q;Graph.handleFactory=Aa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Aa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Aa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};
+parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ma(a,b/2))}return c},label:xa(),ext:xa(),rectangle:xa(),triangle:xa(),rhombus:xa(),umlLifeline:function(a){return[S(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[S(a,
+["width","height"],function(a){var c=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),b=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},
+process:function(a){var c=[S(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",q.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},cross:function(a){return[S(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",ia.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[S(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[S(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",N.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},dataStorage:function(a){return[S(a,
+["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[S(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
+mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),S(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+
+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),S(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-
+c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},internalStorage:function(a){var c=[S(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",H.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
+H.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ma(a));return c},corner:function(a){return[S(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",U.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
+U.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[S(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",P.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=
+Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:pa(1),doubleArrow:pa(.5),folder:function(a){return[S(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==
+mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[S(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));
+return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[S(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[S(a,["size"],function(a){var c=
+Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:za(E.prototype.size,!0,null,!0,E.prototype.fixedSize),hexagon:za(y.prototype.size,!0,.5,!0),curlyBracket:za(l.prototype.size,!1),display:za(ga.prototype.size,!1),cube:Da(1,a.prototype.size,!1),card:Da(.5,r.prototype.size,!0),loopLimit:Da(.5,Z.prototype.size,
+!0),trapezoid:Ga(.5),parallelogram:Ga(1)};Graph.createHandle=S;Graph.handleFactory=Aa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Aa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Aa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};
mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Aa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ba=new mxPoint(1,0),Ca=new mxPoint(1,0),pa=mxUtils.toRadians(-30),Ba=mxUtils.getRotatedPoint(Ba,Math.cos(pa),Math.sin(pa)),pa=mxUtils.toRadians(-150),
-Ca=mxUtils.getRotatedPoint(Ca,Math.cos(pa),Math.sin(pa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,g){var h=a.view;d=null!=d&&0<d.length?d[0]:null;var f=a.absolutePoints,l=f[0],f=f[f.length-1];null!=d&&(d=h.transformControlPoint(a,d));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==f&&null!=b&&(f=new mxPoint(b.getCenterX(),b.getCenterY()));var m=Ba.x,p=Ba.y,t=Ca.x,v=Ca.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=f&&null!=l){a=function(a,c,
-b){a-=w.x;var d=c-w.y;c=(v*a-t*d)/(m*v-p*t);a=(p*a-m*d)/(p*t-m*v);y?(b&&(w=new mxPoint(w.x+m*c,w.y+p*c),g.push(w)),w=new mxPoint(w.x+t*a,w.y+v*a)):(b&&(w=new mxPoint(w.x+t*a,w.y+v*a),g.push(w)),w=new mxPoint(w.x+m*c,w.y+p*c));g.push(w)};var w=l;null==d&&(d=new mxPoint(l.x+(f.x-l.x)/2,l.y+(f.y-l.y)/2));a(d.x,d.y,!0);a(f.x,f.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ma=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==
-mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ma.apply(this,arguments)};b.prototype.constraints=[];f.prototype.constraints=[];w.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,
-1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;v.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
-mxRectangleShape.prototype.constraints;r.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=mxRectangleShape.prototype.constraints;C.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;
-ka.prototype.constraints=mxEllipse.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),
-!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),
-new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];
-n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,
-1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
-.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,
-.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];g.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;c.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;O.prototype.constraints=
-null;T.prototype.constraints=null;K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];
-S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];B.prototype.constraints=null;
-da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),
-!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+Ca=mxUtils.getRotatedPoint(Ca,Math.cos(pa),Math.sin(pa));mxEdgeStyle.IsometricConnector=function(a,c,b,d,g){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var h=a.absolutePoints,l=h[0],h=h[h.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));var m=Ba.x,q=Ba.y,t=Ca.x,v=Ca.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=h&&null!=l){a=function(a,c,
+b){a-=w.x;var d=c-w.y;c=(v*a-t*d)/(m*v-q*t);a=(q*a-m*d)/(q*t-m*v);y?(b&&(w=new mxPoint(w.x+m*c,w.y+q*c),g.push(w)),w=new mxPoint(w.x+t*a,w.y+v*a)):(b&&(w=new mxPoint(w.x+t*a,w.y+v*a),g.push(w)),w=new mxPoint(w.x+m*c,w.y+q*c));g.push(w)};var w=l;null==d&&(d=new mxPoint(l.x+(h.x-l.x)/2,l.y+(h.y-l.y)/2));a(d.x,d.y,!0);a(h.x,h.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ma=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==
+mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ma.apply(this,arguments)};b.prototype.constraints=[];f.prototype.getConstraints=function(a,c,b){a=[];var d=Math.tan(mxUtils.toRadians(30)),g=(.5-d)/2,d=Math.min(c,b/(.5+d));c=(c-d)/2;b=(b-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*d,b+d*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+d,
+b+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+d,b+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*d,b+(1-g)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.75*d));return a};w.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",
+this.position));var g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,.5*(b-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)));c>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];
+mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=
+mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;v.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),
+!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));return a};r.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,b-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)));return a};p.prototype.constraints=mxRectangleShape.prototype.constraints;H.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=
+mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;ga.prototype.getConstraints=function(a,c,b){a=[];var d=Math.min(c,b/2),g=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(g+c-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(g+c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));return a};Z.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=
+mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
+1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
+1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,
+1),!1)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),
+!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,
+.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
+.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
+.25),!1)];g.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;c.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
+!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;P.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*c+.25*d,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),.5*(b+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),.5*(b+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*d,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*g));return a};U.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),g));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];R.prototype.getConstraints=function(a,c,b){a=[];var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize)))),d=(b-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-g),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-g,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-g),b-d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,b-d));return a};ja.prototype.getConstraints=function(a,c,b){a=[];var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize)))),d=(b-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c-g,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));return a};ia.prototype.getConstraints=function(a,c,b){a=[];var d=Math.min(b,c),g=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(b-g)/2,f=d+g,h=(c-g)/2,g=h+g;a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,h,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,b-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,b));a.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+g),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(c+g),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,d));return a};B.prototype.constraints=
+null;ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
+.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)d.model.contains(c[b])&&(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,f=b.editor,d=f.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(b.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);f.graph.setSelectionCells(f.graph.importGraphModel(c.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));b.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",
function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var c=0;c<b.length&&
-a;c++)a=a&&d.model.isEdge(b[c]);var g=d.view.translate,h=d.view.scale,f=g.x,p=g.y,g=null;if(1==b.length&&a){var m=d.getCellGeometry(b[0]);null!=m&&(g=m.getTerminalPoint(!0))}g=null!=g?g:d.getBoundingBoxFromGeometry(b,a);if(null!=g){var t=Math.round(d.snap(d.popupMenuHandler.triggerX/h-f)),k=Math.round(d.snap(d.popupMenuHandler.triggerY/h-p));d.cellsMoved(b,t-g.x,k-g.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&
+a;c++)a=a&&d.model.isEdge(b[c]);var g=d.view.translate,f=d.view.scale,l=g.x,t=g.y,g=null;if(1==b.length&&a){var m=d.getCellGeometry(b[0]);null!=m&&(g=m.getTerminalPoint(!0))}g=null!=g?g:d.getBoundingBoxFromGeometry(b,a);if(null!=g){var q=Math.round(d.snap(d.popupMenuHandler.triggerX/f-l)),k=Math.round(d.snap(d.popupMenuHandler.triggerY/f-t));d.cellsMoved(b,q-g.x,k-g.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&
(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shit+X");this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var f=d.getSelectionCells();for(a=0;a<f.length;a++)if(d.getModel().isVertex(f[a])){var c=d.getCellGeometry(f[a]);null!=c&&(c=c.clone(),c.width=b.copiedSize.width,c.height=b.copiedSize.height,d.getModel().setGeometry(f[a],c))}}finally{d.getModel().endUpdate()}}},
null,null,"Alt+Shit+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){d.setSelectionCells(d.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){d.turnShapes(d.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",
function(){d.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,
@@ -2611,10 +2630,10 @@ null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.fo
0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==d.getSelectionCount()&&0==d.getModel().getChildCount(d.getSelectionCell())?d.setCellStyles("container","0"):d.setSelectionCells(d.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();
b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),c="";if(mxUtils.isNode(d.value)){var g=d.value.getAttribute("tooltip");null!=g&&(c=g)}c=new TextareaDialog(b,mxResources.get("editTooltip")+":",c,function(c){a.setTooltipForCell(d,c)});b.showDialog(c.container,320,200,!0,!0);c.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());
null!=a&&d.openLink(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),c=a.getLinkForCell(d)||"";b.showLinkDialog(c,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(d,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=
-k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var c=null,g=d.getLinkTitle(a);null!=b&&0<b.length&&(c=b[0].iconUrl,g=b[0].name||b[0].type,g=g.charAt(0).toUpperCase()+g.substring(1),30<g.length&&(g=g.substring(0,30)+"..."));var h=d.getFreeInsertPoint(),c=new mxCell(g,new mxGeometry(h.x,h.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
+k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var c=null,g=d.getLinkTitle(a);null!=b&&0<b.length&&(c=b[0].iconUrl,g=b[0].name||b[0].type,g=g.charAt(0).toUpperCase()+g.substring(1),30<g.length&&(g=g.substring(0,30)+"..."));var f=d.getFreeInsertPoint(),c=new mxCell(g,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));c.vertex=!0;d.setLinkForCell(c,a);d.cellSizeUpdated(c,!0);d.getModel().beginUpdate();try{c=d.addCell(c),d.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{d.getModel().endUpdate()}d.setSelectionCell(c);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=
-a.getSelectedElement(),c=a.getParentByName(d,"A",a.cellEditor.textarea),g="";if(null==c&&null!=d&&null!=d.getElementsByTagName)for(var h=d.getElementsByTagName("a"),f=0;f<h.length&&null==c;f++)h[f].textContent==d.textContent&&(a.selectNode(h[f]),c=h[f]);null!=c&&"A"==c.nodeName&&(g=c.getAttribute("href")||"");var p=a.cellEditor.saveSelection();b.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(p);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?
-this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().getChildCount(c))d.updateGroupBounds([c],20);else{var g=d.view.getState(c),h=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=g&&null!=g.text&&null!=h&&d.isWrapping(c)?(h=h.clone(),h.height=g.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(c,h)):
+a.getSelectedElement(),c=a.getParentByName(d,"A",a.cellEditor.textarea),g="";if(null==c&&null!=d&&null!=d.getElementsByTagName)for(var f=d.getElementsByTagName("a"),l=0;l<f.length&&null==c;l++)f[l].textContent==d.textContent&&(a.selectNode(f[l]),c=f[l]);null!=c&&"A"==c.nodeName&&(g=c.getAttribute("href")||"");var t=a.cellEditor.saveSelection();b.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(t);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?
+this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().getChildCount(c))d.updateGroupBounds([c],20);else{var g=d.view.getState(c),f=d.getCellGeometry(c);d.getModel().isVertex(c)&&null!=g&&null!=g.text&&null!=f&&d.isWrapping(c)?(f=f.clone(),f.height=g.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(c,f)):
d.updateCellSize(c)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){var f="1";d.stopEditing();d.getModel().beginUpdate();try{if("1"==a.style.html){var f=null,c=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=c;c=mxUtils.extractTextWithWhitespace(g.childNodes);
d.cellLabelChanged(a.cell,c)}else c=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(c));d.setCellStyles("html",f);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=f?f:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();
null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",f=d.getView().getState(d.getSelectionCell());null!=f&&(a=f.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);
@@ -2627,8 +2646,8 @@ function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("g
n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});
n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});
n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});
-n.isEnabled=k;n=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(b.showDialog((new AboutDialog(b)).container,
-320,280,!0,!0,function(){q=!1}),q=!0)},null,null,"F1"));n=mxUtils.bind(this,function(a,b,c,g){return this.addAction(a,function(){if(null!=c&&d.cellEditor.isContentEditing())c();else{d.stopEditing(!1);d.getModel().beginUpdate();try{d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b),(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
+n.isEnabled=k;n=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,
+320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));n=mxUtils.bind(this,function(a,b,c,g){return this.addAction(a,function(){if(null!=c&&d.cellEditor.isContentEditing())c();else{d.stopEditing(!1);d.getModel().beginUpdate();try{d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b),(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)})}finally{d.getModel().endUpdate()}}},null,null,g)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",
!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});
this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,
@@ -2642,32 +2661,33 @@ function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.
if(null!=a&&d.getModel().isEdge(a)){var b=f.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var c=d.view.translate,g=d.view.scale,h=c.x,c=c.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=l;)h+=l.x,c+=l.y,a=d.getModel().getParent(a),l=d.getCellGeometry(a);h=Math.round(d.snap(d.popupMenuHandler.triggerX/g-h));g=Math.round(d.snap(d.popupMenuHandler.triggerY/g-c));b.addPointAt(b.state,h,g)}}});this.addAction("removeWaypoint",function(){var a=
b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().isEdge(c)){var g=d.getCellGeometry(c);null!=g&&(g=g.clone(),g.points=null,d.getModel().setGeometry(c,g))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",mxUtils.bind(this,
function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=d.getView().getState(d.getSelectionCell()),c="";null!=
-f&&(c=f.style[mxConstants.STYLE_IMAGE]||c);var g=d.cellEditor.saveSelection();b.showImageDialog(a,c,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(g),d.insertImage(a,c,b);else{var h=d.getSelectionCells();if(null!=a&&(0<a.length||0<h.length)){var f=null;d.getModel().beginUpdate();try{if(0==h.length){var l=d.getFreeInsertPoint(),f=h=[d.insertVertex(d.getDefaultParent(),null,"",l.x,l.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-d.fireEvent(new mxEventObject("cellsInserted","cells",f))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,h);var p=d.view.getState(h[0]),k=null!=p?p.style:d.getCellStyle(h[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",h):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,h);if(1==d.getSelectionCount()&&null!=c&&null!=b){var y=h[0],v=d.getModel().getGeometry(y);null!=v&&(v=v.clone(),v.width=c,v.height=b,
-d.getModel().setGeometry(y,v))}}finally{d.getModel().endUpdate()}null!=f&&(d.setSelectionCells(f),d.scrollCellToVisible(f[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",
+f&&(c=f.style[mxConstants.STYLE_IMAGE]||c);var g=d.cellEditor.saveSelection();b.showImageDialog(a,c,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(g),d.insertImage(a,c,b);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var h=null;d.getModel().beginUpdate();try{if(0==f.length){var l=d.getFreeInsertPoint(),h=f=[d.insertVertex(d.getDefaultParent(),null,"",l.x,l.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+d.fireEvent(new mxEventObject("cellsInserted","cells",h))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var t=d.view.getState(f[0]),k=null!=t?t.style:d.getCellStyle(f[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&&null!=c&&null!=b){var y=f[0],v=d.getModel().getGeometry(y);null!=v&&(v=v.clone(),v.width=c,v.height=b,
+d.getModel().setGeometry(y,v))}}finally{d.getModel().endUpdate()}null!=h&&(d.setSelectionCells(h),d.scrollCellToVisible(h[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",
function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+
"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),
b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};
Actions.prototype.addAction=function(a,b,f,d,k){var n;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),n=mxResources.get(a)+"..."):n=mxResources.get(a);return this.put(a,new Action(n,b,f,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,f,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}
-mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.stats={joined:0,merged:0,lastMerge:0,lastMergeTime:0,lastOpenTime:0,shadowState:0,opened:0,closed:0,destroyed:0,fileMerged:0,fileSaved:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.stats={joined:0,merged:0,lastMerge:0,lastMergeTime:0,lastOpenTime:0,lastIgnored:0,shadowState:0,opened:0,closed:0,destroyed:0,fileMerged:0,fileSaved:0,reload:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0,conflicts:0,timeouts:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;
DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
DrawioFile.prototype.updateFile=function(a,b,f,d){null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b(e):this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b(e):null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(n){null!=b&&b(n)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,f,d){try{this.stats.fileMerged++;var k=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkPages(k,"mergeFile init");this.shadowPages=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);this.backupPatch=this.isModified()?this.ui.diffPages(k,this.ui.pages):null;var n=[this.ui.diffPages(null!=d?d:k,this.shadowPages)];if(this.ignorePatches(n))this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());
-else{var q=this.ui.patchPages(k,n[0]);this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());this.checkPages(q,"mergeFile patched");d={};var r=this.ui.getHashValueForPages(q,d),k={},u=this.ui.getHashValueForPages(this.shadowPages,k);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",n,"checksum",u==r,r);if(null!=r&&r!=u){var c=this.compressReportData(this.getAnonymizedXmlForPages(q));this.checksumError(f,n,(null!=d?"Details: "+JSON.stringify(d):"")+
-"\nChecksum: "+r+"\nCurrent: "+u+(null!=k?"\nCurrent Details: "+JSON.stringify(k):"")+"\nPatched:\n"+c);return}this.patch(n,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages(this.ui.pages,"mergeFile done")}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(g){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(g);try{this.sendErrorReport("Error in mergeFile",
-null,g)}catch(h){}}};DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),f=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);f.appendChild(k)}return mxUtils.getPrettyXml(f)};
+DrawioFile.prototype.mergeFile=function(a,b,f,d){try{this.stats.fileMerged++;var k=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement);this.checkPages(k,"mergeFile init");var n=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=n&&0<n.length){this.shadowPages=n;this.backupPatch=this.isModified()?this.ui.diffPages(k,this.ui.pages):null;var p=[this.ui.diffPages(null!=d?d:k,this.shadowPages)];if(this.ignorePatches(p))this.stats.shadowState=
+this.ui.hashValue(a.getCurrentEtag());else{var r=this.ui.patchPages(k,p[0]);this.stats.shadowState=this.ui.hashValue(a.getCurrentEtag());this.checkPages(r,"mergeFile patched");d={};var u=this.ui.getHashValueForPages(r,d),k={},c=this.ui.getHashValueForPages(this.shadowPages,k);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",p,"checksum",c==u,u);if(null!=u&&u!=c){var g=this.compressReportData(this.getAnonymizedXmlForPages(r));this.checksumError(f,p,(null!=
+d?"Details: "+JSON.stringify(d):"")+"\nChecksum: "+u+"\nCurrent: "+c+(null!=k?"\nCurrent Details: "+JSON.stringify(k):"")+"\nPatched:\n"+g);return}this.patch(p,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);this.checkPages(this.ui.pages,"mergeFile done")}}else try{0==this.stats.lastIgnored&&this.sendErrorReport("Ignored empty pages in mergeFile","File Data: "+this.compressReportData(this.ui.anonymizeString(a.data),null,500)),this.stats.lastIgnored=(new Date).toISOString()}catch(h){}this.inConflictState=
+this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(h){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(h);try{this.sendErrorReport("Error in mergeFile",null,h)}catch(l){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),f=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);f.appendChild(k)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.checkPages=function(a,b){if(this.ui.getCurrentFile()==this&&(null==a||0==a.length)){var f=null==this.shadowData?"null":this.compressReportData(this.ui.anonymizeString(this.shadowData),null,5E3);this.sendErrorReport("Pages is null or empty","Shadow: "+(null!=a?a.length:"null")+"\nShadowPages: "+(null!=this.shadowPages?this.shadowPages.length:"null")+(null!=b?"\nInfo: "+b:"")+"\nShadowData: "+f)}};
DrawioFile.prototype.compressReportData=function(a,b,f){null!=a&&a.length>(null!=b?b:1E4)&&(a=this.ui.editor.graph.compress(a)+"\n");null!=f&&null!=a&&a.length>f&&(a=a.substring(0,f)+"[...]");return a};
DrawioFile.prototype.checksumError=function(a,b,f,d){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var k=Error(),n=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=f?f:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nHeadRevision:\n"+a:""),k,7E4)});null==d?n(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?n(a):n(null)}),function(){})}catch(q){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,f,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.getCurrentUser(),q=null!=n?this.ui.hashValue(n.id):"unknown",r=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var u=this.getTitle(),c=u.lastIndexOf("."),n="xml";0<c&&(n=u.substring(c));var g=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+
-" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+n+")\nUser="+q+" ("+r+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+(null!=f?"\nError="+f:"")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+"\n\nShadow:\n"+k+"\n\nStack:\n"+g,d)}catch(h){}};
+25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=f?f:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nMaster:\n"+a:""),k,7E4)});null==d?n(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?n(a):n(null)}),function(){})}catch(p){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,f,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.getCurrentUser(),p=null!=n?this.ui.hashValue(n.id):"unknown",r=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var u=this.getTitle(),c=u.lastIndexOf("."),n="xml";0<c&&(n=u.substring(c));var g=null!=f?f.stack:Error().stack;EditorUi.sendReport(a+
+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+n+")\nUser="+p+" ("+r+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+(null!=f?"\nError="+f:"")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+"\n\nShadow:\n"+k+"\n\nStack:\n"+g,d)}catch(h){}};
DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),f=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,b,f);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);
null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,f=0;f<a.length&&b;f++)b=b&&0==Object.keys(a[f]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var f=this.ui.editor.undoManager,d=f.history.slice(),k=f.indexOfNextAdd,n=this.ui.editor.graph;n.container.style.visibility="hidden";var q=this.changeListenerEnabled;this.changeListenerEnabled=!1;var r=n.foldingEnabled,u=n.mathEnabled,c=n.cellRenderer.redraw;n.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());c.apply(this,arguments)};n.model.beginUpdate();try{for(var g=
-0;g<a.length;g++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[g],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{n.model.endUpdate();n.container.style.visibility="";n.cellRenderer.redraw=c;this.changeListenerEnabled=q;f.history=d;f.indexOfNextAdd=k;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)u!=
+DrawioFile.prototype.patch=function(a,b){var f=this.ui.editor.undoManager,d=f.history.slice(),k=f.indexOfNextAdd,n=this.ui.editor.graph;n.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var r=n.foldingEnabled,u=n.mathEnabled,c=n.cellRenderer.redraw;n.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());c.apply(this,arguments)};n.model.beginUpdate();try{for(var g=
+0;g<a.length;g++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[g],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{n.model.endUpdate();n.container.style.visibility="";n.cellRenderer.redraw=c;this.changeListenerEnabled=p;f.history=d;f.indexOfNextAdd=k;f.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)u!=
n.mathEnabled?(this.ui.editor.updateGraphComponents(),n.refresh()):(r!=n.foldingEnabled?n.view.revalidate():n.view.validate(),n.sizeDidChange()),null!=this.ui.format&&n.isSelectionEmpty()&&this.ui.format.refresh();this.ui.updateTabContainer()}};
DrawioFile.prototype.save=function(a,b,f,d,k,n){if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave();else if(null!=f)f({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};
DrawioFile.prototype.saveAs=function(a,b,f){};DrawioFile.prototype.saveFile=function(a,b,f,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};
@@ -2698,8 +2718,8 @@ DrawioFile.prototype.handleConflictError=function(a,b){var f=mxUtils.bind(this,f
function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,f,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,d,k):this.invalidChecksum?this.showRefreshDialog(f,d,this.getErrorMessage(a)):b?this.showConflictDialog(k,n):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(f,
d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};
DrawioFile.prototype.fileChanged=function(){this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null==this.autosaveThread&&this.handleFileSuccess(!0)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus()};
-DrawioFile.prototype.fileSaved=function(a,b,f,d){try{this.stats.fileSaved++,this.invalidChecksum=this.inConflictState=!1,this.checkPages(this.ui.pages,"fileSaved"),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=f&&f()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,f,d)}catch(k){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(k);try{this.sendErrorReport("Error in fileSaved","SavedData:\n"+this.compressReportData(this.ui.anonymizeString(a),
-5E3),k)}catch(n){}}};
+DrawioFile.prototype.fileSaved=function(a,b,f,d){try{this.stats.fileSaved++,this.invalidChecksum=this.inConflictState=!1,this.checkPages(this.ui.pages,"fileSaved"),null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=f&&f()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,f,d)}catch(k){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(k);try{this.sendErrorReport("Error in fileSaved","Saved Data:\n"+this.compressReportData(this.ui.anonymizeString(a),
+null,500),k)}catch(n){}}};
DrawioFile.prototype.autosave=function(a,b,f,d){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=
f&&f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -2740,7 +2760,7 @@ c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.get
else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var g=new mxCodec(d.ownerDocument);g.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&
!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,
arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=
-c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(F){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var g=0;g<b.length;g++)if("mxgraph"==b[g].getAttribute("class")){d.push(b[g]);
+c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(G){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var g=0;g<b.length;g++)if("mxgraph"==b[g].getAttribute("class")){d.push(b[g]);
break}0<d.length&&(b=d[0].getAttribute("data-mxgraph"),null!=b?(d=JSON.parse(b),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(b=mxUtils.getTextContent(d[0]),b=this.graph.decompress(b),0<b.length&&(d=mxUtils.parseXml(b),a=d.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&
(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(d=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=d&&(b=this.graph.decompress(mxUtils.getTextContent(d)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||
(a=null);return a};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
@@ -2749,12 +2769,12 @@ a.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])},0)};window.Mat
MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,
c){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var g=document.createElement("script");g.type="text/javascript";g.src=a;d[0].parentNode.appendChild(g)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,d,g){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==g&&c.push(g);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var n=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){n.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var q=Format.prototype.init;Format.prototype.init=function(){q.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
+var n=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){n.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
this.update)};var r=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?r.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var u=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
function(a){a=u.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;b.model.execute(d)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});
Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));a.appendChild(d)}return a};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;if(d.isEnabled()){var g=b.getCurrentFile();null!=g&&g.isAutosaveOptional()&&(g=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},
{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(g))}if(this.isMathOptionVisible()&&d.isEnabled()&&"undefined"!==typeof MathJax){g=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return d.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(d.mathEnabled)};b.addListener("mathEnabledChanged",
-this.listener)},destroy:function(){b.removeListener(this.listener)}});g.style.paddingTop="5px";a.appendChild(g);var h=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");h.style.position="relative";h.style.marginLeft="6px";h.style.top="2px";g.appendChild(h)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
+this.listener)},destroy:function(){b.removeListener(this.listener)}});g.style.paddingTop="5px";a.appendChild(g);var f=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");f.style.position="relative";f.style.marginLeft="6px";f.style.top="2px";g.appendChild(f)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",
type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,
@@ -2775,33 +2795,33 @@ defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,m
stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",
font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[null,{fill:mxConstants.NONE,stroke:"#36393d"},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",
gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",
-stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var d=function(a){if(null!=a)if(b)for(var d=0;d<a.length;d++)c[a[d].name]=a[d];else for(var g in c){for(var h=!1,d=0;d<a.length;d++)if(a[d].name==g&&a[d].type==c[g].type){h=!0;break}h||delete c[g]}},g=this.editorUi.editor.graph.view.getState(a);null!=g&&null!=g.shape&&(g.shape.commonCustomPropAdded||(g.shape.commonCustomPropAdded=!0,g.shape.customProperties=
-g.shape.customProperties||[],g.cell.vertex?Array.prototype.push.apply(g.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(g.shape.customProperties,Editor.commonEdgeProperties)),d(g.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(E){}}};var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
-g.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,d=a.edges,h=0;h<b.length;h++)this.findCommonProperties(b[h],c,0==h);for(h=0;h<d.length;h++)this.findCommonProperties(d[h],c,0==b.length&&0==h);0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var h=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,
+stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var d=function(a){if(null!=a)if(b)for(var d=0;d<a.length;d++)c[a[d].name]=a[d];else for(var g in c){for(var f=!1,d=0;d<a.length;d++)if(a[d].name==g&&a[d].type==c[g].type){f=!0;break}f||delete c[g]}},g=this.editorUi.editor.graph.view.getState(a);null!=g&&null!=g.shape&&(g.shape.commonCustomPropAdded||(g.shape.commonCustomPropAdded=!0,g.shape.customProperties=
+g.shape.customProperties||[],g.cell.vertex?Array.prototype.push.apply(g.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(g.shape.customProperties,Editor.commonEdgeProperties)),d(g.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(F){}}};var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
+g.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,d=a.edges,f=0;f<b.length;f++)this.findCommonProperties(b[f],c,0==f);for(f=0;f<d.length;f++)this.findCommonProperties(d[f],c,0==b.length&&0==f);0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var h=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");
-c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,c,b,d){w.getModel().beginUpdate();try{var g=[],h=[];if(null!=b.index){for(var f=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)f.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<f.length?null!=d?f.splice(d,1):f[b.index]=c:f.push(c);null!=b.size&&f.length>
-b.size&&(f=f.slice(0,b.size));c=f.join(",");null!=b.countProperty&&(w.setCellStyles(b.countProperty,f.length,w.getSelectionCells()),g.push(b.countProperty),h.push(f.length))}w.setCellStyles(a,c,w.getSelectionCells());g.push(a);h.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var m=b.dependentPropsDefVal[a],p=b.dependentPropsVals[a];if(p.length>c)p=p.slice(0,c);else for(var v=p.length;v<c;v++)p.push(m);p=p.join(",");w.setCellStyles(b.dependentProps[a],p,w.getSelectionCells());
-g.push(b.dependentProps[a]);h.push(p)}t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",g,"values",h,"cells",w.getSelectionCells()))}finally{w.getModel().endUpdate()}}function g(c,b,d){var g=mxUtils.getOffset(a,!0),h=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=h.x-g.x+"px";b.style.top=h.y-g.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function h(a,c,b){var g=document.createElement("div");g.style.width="32px";g.style.height=
-"4px";g.style.margin="2px";g.style.border="1px solid black";g.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(h){this.editorUi.pickColor(c,function(c){g.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(h)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(g);return btn}function f(a,c,b,g,h,f,l){null!=c&&(c=c.split(","),v.push({name:a,
-values:c,type:b,defVal:g,countProperty:h,parentRow:f,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var m=f,t=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==a)m=m.nextSibling,t++;else break;var w={type:b,parentRow:f,index:t,isDeletable:!0,defVal:g,countProperty:h},t=p(a,"",w,0==t%2,l);d(a,g,w);m.parentNode.insertBefore(t,m.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function l(a,c,b,d,g,h,f){if(0<g){var l=Array(g);c=null!=c?c.split(","):[];for(var m=0;m<g;m++)l[m]=null!=c[m]?c[m]:null!=d?d:"";v.push({name:a,values:l,type:b,defVal:d,parentRow:h,flipBkg:f,size:g})}return document.createElement("div")}function m(a,c,b){var g=document.createElement("input");g.type="checkbox";g.checked="1"==c;mxEvent.addListener(g,"change",function(){d(a,g.checked?"1":"0",b)});return g}function p(c,b,p,w,v){var k=p.dispName,x=p.type,n=document.createElement("tr");n.className="gePropRow"+
-(v?"Dark":"")+(w?"Alt":"")+" gePropNonHeaderRow";n.setAttribute("data-pName",c);n.setAttribute("data-pValue",b);w=!1;null!=p.index&&(n.setAttribute("data-index",p.index),k=(null!=k?k:"")+"["+p.index+"]",w=!0);var y=document.createElement("td");y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(k,null,k));w&&(y.style.textAlign="right");n.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(h(c,b,p));else if("bool"==x||"boolean"==
-x)y.appendChild(m(c,b,p));else if("enum"==x){var z=p.enumList;for(v=0;v<z.length;v++)if(k=z[v],k.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(t,function(){var h=document.createElement("select");g(y,h);for(var f=0;f<z.length;f++){var l=z[f],m=document.createElement("option");m.value=mxUtils.htmlEntities(l.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));h.appendChild(m)}h.value=
-b;a.appendChild(h);mxEvent.addListener(h,"change",function(){var a=mxUtils.htmlEntities(h.value);d(c,a,p)});h.focus();mxEvent.addListener(h,"blur",function(){a.removeChild(h)})}))}else"dynamicArr"==x?y.appendChild(f(c,b,p.subType,p.subDefVal,p.countProperty,n,v)):"staticArr"==x?y.appendChild(l(c,b,p.subType,p.subDefVal,p.size,n,v)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(t,function(){function h(){var a=f.value,a=0==a.length&&"string"!=x?0:a;p.allowAuto&&("auto"==a.trim().toLowerCase()?
-(a="auto",x="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==x?parseInt(a):a)+"");d(c,a,p)}var f=document.createElement("input");g(y,f,!0);f.value=b;f.className="gePropEditor";"int"!=x&&"float"!=x||p.allowAuto||(f.type="number",f.step="int"==x?"1":"any",null!=p.min&&(f.min=parseFloat(p.min)),null!=p.max&&(f.max=parseFloat(p.max)));a.appendChild(f);mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&h()});
-f.focus();mxEvent.addListener(f,"blur",function(){h()})})));p.isDeletable&&(v=mxUtils.button("-",mxUtils.bind(t,function(a){d(c,"",p,p.index);mxEvent.consume(a)})),v.style.height="16px",v.style.width="25px",v.style["float"]="right",v.className="geColorBtn",y.appendChild(v));n.appendChild(y);return n}var t=this,w=this.editorUi.editor.graph,v=[];a.style.position="relative";a.style.padding="0";var k=document.createElement("table");k.style.whiteSpace="nowrap";k.style.width="100%";var x=document.createElement("tr");
-x.className="gePropHeader";var n=document.createElement("th");n.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;n.appendChild(y);mxUtils.write(n,mxResources.get("property"));x.style.cursor="pointer";var A=function(){var c=k.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var g=a.childNodes[d],h=g.nodeName.toUpperCase();"INPUT"!=
-h&&"SELECT"!=h||a.removeChild(g)}catch(ba){}}else y.src=Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(x,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;A()});x.appendChild(n);n=document.createElement("th");n.className="gePropHeaderCell";n.innerHTML=mxResources.get("value");x.appendChild(n);k.appendChild(x);var q=!1,D=!1,r;for(r in c)if(x=c[r],"function"!=typeof x.isVisible||x.isVisible(b)){var u=null!=b.style[r]?
-mxUtils.htmlEntities(b.style[r]+""):x.defVal;if("separator"==x.type)D=!D;else{if("staticArr"==x.type)x.size=parseInt(b.style[x.sizeProperty]||c[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var T=x.dependentProps,K=[],O=[],n=0;n<T.length;n++){var S=b.style[T[n]];O.push(c[T[n]].subDefVal);K.push(null!=S?S.split(","):[])}x.dependentPropsDefVal=O;x.dependentPropsVals=K}k.appendChild(p(r,u,x,q,D));q=!q}}for(n=0;n<v.length;n++)for(x=v[n],c=x.parentRow,b=0;b<x.values.length;b++)r=p(x.name,
-x.values[b],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:b,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==b%2,x.flipBkg),c.parentNode.insertBefore(r,c.nextSibling),c=r;a.appendChild(k);A();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(c=0;c<b.length;c++){for(var g=d.getModel().getStyle(b[c]),f=0;f<h.length;f++)g=mxUtils.removeStylename(g,
-h[f]);var l=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,null)),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,
+c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,c,b,d){w.getModel().beginUpdate();try{var g=[],f=[];if(null!=b.index){for(var h=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)h.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<h.length?null!=d?h.splice(d,1):h[b.index]=c:h.push(c);null!=b.size&&h.length>
+b.size&&(h=h.slice(0,b.size));c=h.join(",");null!=b.countProperty&&(w.setCellStyles(b.countProperty,h.length,w.getSelectionCells()),g.push(b.countProperty),f.push(h.length))}w.setCellStyles(a,c,w.getSelectionCells());g.push(a);f.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var m=b.dependentPropsDefVal[a],q=b.dependentPropsVals[a];if(q.length>c)q=q.slice(0,c);else for(var v=q.length;v<c;v++)q.push(m);q=q.join(",");w.setCellStyles(b.dependentProps[a],q,w.getSelectionCells());
+g.push(b.dependentProps[a]);f.push(q)}t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",g,"values",f,"cells",w.getSelectionCells()))}finally{w.getModel().endUpdate()}}function g(c,b,d){var g=mxUtils.getOffset(a,!0),f=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=f.x-g.x+"px";b.style.top=f.y-g.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function f(a,c,b){var g=document.createElement("div");g.style.width="32px";g.style.height=
+"4px";g.style.margin="2px";g.style.border="1px solid black";g.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(f){this.editorUi.pickColor(c,function(c){g.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(f)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(g);return btn}function h(a,c,b,g,f,h,l){null!=c&&(c=c.split(","),v.push({name:a,
+values:c,type:b,defVal:g,countProperty:f,parentRow:h,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var m=h,t=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==a)m=m.nextSibling,t++;else break;var w={type:b,parentRow:h,index:t,isDeletable:!0,defVal:g,countProperty:f},t=q(a,"",w,0==t%2,l);d(a,g,w);m.parentNode.insertBefore(t,m.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function l(a,c,b,d,g,f,h){if(0<g){var l=Array(g);c=null!=c?c.split(","):[];for(var m=0;m<g;m++)l[m]=null!=c[m]?c[m]:null!=d?d:"";v.push({name:a,values:l,type:b,defVal:d,parentRow:f,flipBkg:h,size:g})}return document.createElement("div")}function m(a,c,b){var g=document.createElement("input");g.type="checkbox";g.checked="1"==c;mxEvent.addListener(g,"change",function(){d(a,g.checked?"1":"0",b)});return g}function q(c,b,q,w,v){var k=q.dispName,x=q.type,n=document.createElement("tr");n.className="gePropRow"+
+(v?"Dark":"")+(w?"Alt":"")+" gePropNonHeaderRow";n.setAttribute("data-pName",c);n.setAttribute("data-pValue",b);w=!1;null!=q.index&&(n.setAttribute("data-index",q.index),k=(null!=k?k:"")+"["+q.index+"]",w=!0);var y=document.createElement("td");y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(k,null,k));w&&(y.style.textAlign="right");n.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(f(c,b,q));else if("bool"==x||"boolean"==
+x)y.appendChild(m(c,b,q));else if("enum"==x){var z=q.enumList;for(v=0;v<z.length;v++)if(k=z[v],k.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(k.dispName,null,k.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(t,function(){var f=document.createElement("select");g(y,f);for(var h=0;h<z.length;h++){var l=z[h],m=document.createElement("option");m.value=mxUtils.htmlEntities(l.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(m)}f.value=
+b;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);d(c,a,q)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==x?y.appendChild(h(c,b,q.subType,q.subDefVal,q.countProperty,n,v)):"staticArr"==x?y.appendChild(l(c,b,q.subType,q.subDefVal,q.size,n,v)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(t,function(){function f(){var a=h.value,a=0==a.length&&"string"!=x?0:a;q.allowAuto&&("auto"==a.trim().toLowerCase()?
+(a="auto",x="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==x?parseInt(a):a)+"");d(c,a,q)}var h=document.createElement("input");g(y,h,!0);h.value=b;h.className="gePropEditor";"int"!=x&&"float"!=x||q.allowAuto||(h.type="number",h.step="int"==x?"1":"any",null!=q.min&&(h.min=parseFloat(q.min)),null!=q.max&&(h.max=parseFloat(q.max)));a.appendChild(h);mxEvent.addListener(h,"keypress",function(a){13==a.keyCode&&f()});
+h.focus();mxEvent.addListener(h,"blur",function(){f()})})));q.isDeletable&&(v=mxUtils.button("-",mxUtils.bind(t,function(a){d(c,"",q,q.index);mxEvent.consume(a)})),v.style.height="16px",v.style.width="25px",v.style["float"]="right",v.className="geColorBtn",y.appendChild(v));n.appendChild(y);return n}var t=this,w=this.editorUi.editor.graph,v=[];a.style.position="relative";a.style.padding="0";var k=document.createElement("table");k.style.whiteSpace="nowrap";k.style.width="100%";var x=document.createElement("tr");
+x.className="gePropHeader";var n=document.createElement("th");n.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;n.appendChild(y);mxUtils.write(n,mxResources.get("property"));x.style.cursor="pointer";var A=function(){var c=k.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var g=a.childNodes[d],f=g.nodeName.toUpperCase();"INPUT"!=
+f&&"SELECT"!=f||a.removeChild(g)}catch(ca){}}else y.src=Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(x,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;A()});x.appendChild(n);n=document.createElement("th");n.className="gePropHeaderCell";n.innerHTML=mxResources.get("value");x.appendChild(n);k.appendChild(x);var p=!1,E=!1,r;for(r in c)if(x=c[r],"function"!=typeof x.isVisible||x.isVisible(b)){var u=null!=b.style[r]?
+mxUtils.htmlEntities(b.style[r]+""):x.defVal;if("separator"==x.type)E=!E;else{if("staticArr"==x.type)x.size=parseInt(b.style[x.sizeProperty]||c[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var U=x.dependentProps,L=[],P=[],n=0;n<U.length;n++){var R=b.style[U[n]];P.push(c[U[n]].subDefVal);L.push(null!=R?R.split(","):[])}x.dependentPropsDefVal=P;x.dependentPropsVals=L}k.appendChild(q(r,u,x,p,E));p=!p}}for(n=0;n<v.length;n++)for(x=v[n],c=x.parentRow,b=0;b<x.values.length;b++)r=q(x.name,
+x.values[b],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:b,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==b%2,x.flipBkg),c.parentNode.insertBefore(r,c.nextSibling),c=r;a.appendChild(k);A();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(c=0;c<b.length;c++){for(var g=d.getModel().getStyle(b[c]),h=0;h<f.length;h++)g=mxUtils.removeStylename(g,
+f[h]);var l=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,null)),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,
a.font||mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null)))):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,"#ffffff")),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,"#000000")),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,
null))));d.getModel().setStyle(b[c],g)}}finally{d.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?
-c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=a.fill||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),c.style.border="1px solid "+(a.stroke||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000"));else{var b=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+
-f}g.appendChild(c)}g.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(g),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.paddingLeft="24px";g.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);
-var h="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var f=document.createElement("div");f.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(f),a.appendChild(l));mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(f);b(l);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=a.fill||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),c.style.border="1px solid "+(a.stroke||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000"));else{var b=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),h=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+
+h}g.appendChild(c)}g.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(g),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.paddingLeft="24px";g.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);
+var f="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var h=document.createElement("div");h.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(h),a.appendChild(l));mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(h);b(l);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var d=this.editorUi.editor.graph,g=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
@@ -2809,19 +2829,19 @@ function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("ti
this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if(null!=c){if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}if("undefined"!=typeof mxTableLayout&&"tableLayout"==c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),
b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return d.apply(this,arguments)}};
-var p=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return p.apply(this,arguments)&&!mxClient.IS_SF};var m=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=m.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}null!=this.globalUrlVars&&(c=
-this.globalUrlVars[a])}return c};var t=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){t.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+var t=Graph.prototype.isCssTransformsSupported;Graph.prototype.isCssTransformsSupported=function(){return t.apply(this,arguments)&&!mxClient.IS_SF};var m=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=m.apply(this,arguments);if(null==c){if(null==this.globalUrlVars&&null!=urlParams.vars)try{this.globalUrlVars=JSON.parse(decodeURIComponent(urlParams.vars))}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}null!=this.globalUrlVars&&(c=
+this.globalUrlVars[a])}return c};var q=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){q.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var x=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=
function(){x.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<a.actions.length;c++)if(null!=a.actions[c].open)if(this.isCustomLink(a.actions[c].open)){if(!this.customLinkClicked(a.actions[c].open))return}else this.openLink(a.actions[c].open);this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)this.handleLinkAction(a.actions[c])}finally{this.model.endUpdate()}}};
Graph.prototype.handleLinkAction=function(a){var c=[];null!=a.select&&this.isEnabled()&&(c=this.getCellsForAction(a.select),this.setSelectionCells(c));null!=a.highlight&&(c=this.getCellsForAction(a.highlight),this.highlightCells(c,a.highlight.color,a.highlight.duration,a.highlight.opacity));null!=a.toggle&&this.toggleCells(this.getCellsForAction(a.toggle));null!=a.show&&this.setCellsVisible(this.getCellsForAction(a.show),!0);null!=a.hide&&this.setCellsVisible(this.getCellsForAction(a.hide),!1);null!=
a.scroll&&(c=this.getCellsForAction(a.scroll));0<c.length&&this.scrollCellToVisible(c[0])};Graph.prototype.getCellsForAction=function(a){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var d=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=d},d));else{var g=this.model.getCell(a[b]);null!=g&&c.push(g)}return c};Graph.prototype.getCellsForTags=
-function(a,c,b){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var g=0;g<c.length;g++)if(this.model.isVertex(c[g])||this.model.isEdge(c[g])){var h=null!=c[g].value&&"object"==typeof c[g].value?mxUtils.trim(c[g].value.getAttribute(b)||""):"",f=!0;if(0<h.length)for(var h=h.toLowerCase().split(" "),l=0;l<a.length&&f;l++)var m=mxUtils.trim(a[l]).toLowerCase(),f=f&&(0==m.length||0<=mxUtils.indexOf(h,m));else f=0==a.length;f&&d.push(c[g])}}return d};
+function(a,c,b){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var g=0;g<c.length;g++)if(this.model.isVertex(c[g])||this.model.isEdge(c[g])){var f=null!=c[g].value&&"object"==typeof c[g].value?mxUtils.trim(c[g].value.getAttribute(b)||""):"",h=!0;if(0<f.length)for(var f=f.toLowerCase().split(" "),l=0;l<a.length&&h;l++)var m=mxUtils.trim(a[l]).toLowerCase(),h=h&&(0==m.length||0<=mxUtils.indexOf(f,m));else h=0==a.length;h&&d.push(c[g])}}return d};
Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,d){for(var g=0;g<a.length;g++)this.highlightCell(a[g],c,b,d)};Graph.prototype.highlightCell=function(a,c,
-b,d){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var g=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),h=new mxCellHighlight(this,c,g,!1);null!=d&&(h.opacity=d);h.highlight(a);window.setTimeout(function(){null!=h.shape&&(mxUtils.setPrefixedStyle(h.shape.node.style,"transition","all 1200ms ease-in-out"),h.shape.node.style.opacity=0);window.setTimeout(function(){h.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,
-c,b){b=null!=b?b:!1;var d=a.ownerDocument,g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");g.setAttribute("id",this.shadowId);var h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");h.setAttribute("in","SourceAlpha");h.setAttribute("stdDeviation",this.svgShadowBlur);h.setAttribute("result","blur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):
-d.createElement("feOffset");h.setAttribute("in","blur");h.setAttribute("dx",this.svgShadowSize);h.setAttribute("dy",this.svgShadowSize);h.setAttribute("result","offsetBlur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");h.setAttribute("flood-color",this.svgShadowColor);h.setAttribute("flood-opacity",this.svgShadowOpacity);h.setAttribute("result","offsetColor");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
-"feComposite"):d.createElement("feComposite");h.setAttribute("in","offsetColor");h.setAttribute("in2","offsetBlur");h.setAttribute("operator","in");h.setAttribute("result","offsetBlur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");h.setAttribute("in","SourceGraphic");h.setAttribute("in2","offsetBlur");g.appendChild(h);h=a.getElementsByTagName("defs");0==h.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
-"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=h[0];d.appendChild(g);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+b,d){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var g=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,c,g,!1);null!=d&&(f.opacity=d);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,
+c,b){b=null!=b?b:!1;var d=a.ownerDocument,g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");g.setAttribute("id",this.shadowId);var f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");f.setAttribute("in","SourceAlpha");f.setAttribute("stdDeviation",this.svgShadowBlur);f.setAttribute("result","blur");g.appendChild(f);f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):
+d.createElement("feOffset");f.setAttribute("in","blur");f.setAttribute("dx",this.svgShadowSize);f.setAttribute("dy",this.svgShadowSize);f.setAttribute("result","offsetBlur");g.appendChild(f);f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");f.setAttribute("flood-color",this.svgShadowColor);f.setAttribute("flood-opacity",this.svgShadowOpacity);f.setAttribute("result","offsetColor");g.appendChild(f);f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
+"feComposite"):d.createElement("feComposite");f.setAttribute("in","offsetColor");f.setAttribute("in2","offsetBlur");f.setAttribute("operator","in");f.setAttribute("result","offsetBlur");g.appendChild(f);f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");f.setAttribute("in","SourceGraphic");f.setAttribute("in2","offsetBlur");g.appendChild(f);f=a.getElementsByTagName("defs");0==f.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,
+"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=f[0];d.appendChild(g);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];
mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=
[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=
@@ -2831,50 +2851,50 @@ mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarku
mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];
mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",
STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,
-5)&&(c="mxgraph.sysml"));return c};var w=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,g,h,f,l,m,p){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return w.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){x.value=Math.max(1,Math.min(l,Math.max(parseInt(x.value),parseInt(k.value))));k.value=Math.max(1,Math.min(l,Math.min(parseInt(x.value),parseInt(k.value))))}function d(c){function b(c,b,g){var h=
-c.getGraphBounds(),f=0,l=0,m=W.get(),p=1/c.pageScale,t=y.checked;if(t)var p=parseInt(C.value),w=parseInt(da.value),p=Math.min(m.height*w/(h.height/c.view.scale),m.width*p/(h.width/c.view.scale));else p=parseInt(q.value)/(100*c.pageScale),isNaN(p)&&(d=1/c.pageScale,q.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*d);m.height=Math.ceil(m.height*d);p*=d;!t&&c.pageVisible?(h=c.getPageLayout(),f-=h.x*m.width,l-=h.y*m.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,
-p,m,0,f,l,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var k=b.writeHead;b.writeHead=function(c){k.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var x=b.renderPage;b.renderPage=function(a,c,b,d,g,h){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var l=x.apply(this,
-arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}b.open(null,null,g,!0)}else{m=c.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=t;b.appendGraph(c,p,f,l,g,!0)}return b}var d=parseInt(Y.value)/100;isNaN(d)&&(d=1,Y.value="100 %");var d=.75*d,h=k.value,f=x.value,l=!t.checked,p=null;l&&(l=h==m&&f==m);if(!l&&null!=a.pages&&a.pages.length){var w=0,l=a.pages.length-1;t.checked||
-(w=parseInt(h)-1,l=parseInt(f)-1);for(var v=w;v<=l;v++){var n=a.pages[v],h=n==a.currentPage?g:null;if(null==h){var h=a.createTemporaryGraph(g.getStylesheet()),f=!0,w=!1,z=null,A=null;null==n.viewState&&null==n.root&&a.updatePageRoot(n);null!=n.viewState&&(f=n.viewState.pageVisible,w=n.viewState.mathEnabled,z=n.viewState.background,A=n.viewState.backgroundImage);h.background=z;h.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;h.pageVisible=f;h.mathEnabled=w;var D=h.getGlobalVariable;
-h.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?v+1:D.apply(this,arguments)};document.body.appendChild(h.container);a.updatePageRoot(n);h.model.setRoot(n.root)}p=b(h,p,v!=l);h!=g&&h.container.parentNode.removeChild(h.container)}}else p=b(g);p.mathEnabled&&(l=p.wnd.document,l.writeln('<script type="text/x-mathjax-config">'),l.writeln("MathJax.Hub.Config({"),l.writeln("showMathMenu: false,"),l.writeln('messageStyle: "none",'),l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
+5)&&(c="mxgraph.sysml"));return c};var w=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,g,f,h,l,m,q){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return w.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){x.value=Math.max(1,Math.min(l,Math.max(parseInt(x.value),parseInt(k.value))));k.value=Math.max(1,Math.min(l,Math.min(parseInt(x.value),parseInt(k.value))))}function d(c){function b(c,b,g){var f=
+c.getGraphBounds(),h=0,l=0,m=X.get(),q=1/c.pageScale,t=y.checked;if(t)var q=parseInt(D.value),w=parseInt(ea.value),q=Math.min(m.height*w/(f.height/c.view.scale),m.width*q/(f.width/c.view.scale));else q=parseInt(p.value)/(100*c.pageScale),isNaN(q)&&(d=1/c.pageScale,p.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*d);m.height=Math.ceil(m.height*d);q*=d;!t&&c.pageVisible?(f=c.getPageLayout(),h-=f.x*m.width,l-=f.y*m.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,
+q,m,0,h,l,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var k=b.writeHead;b.writeHead=function(c){k.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var x=b.renderPage;b.renderPage=function(a,c,b,d,g,f){var h=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var l=x.apply(this,
+arguments);mxClient.NO_FO=h;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}b.open(null,null,g,!0)}else{m=c.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=t;b.appendGraph(c,q,h,l,g,!0)}return b}var d=parseInt(Z.value)/100;isNaN(d)&&(d=1,Z.value="100 %");var d=.75*d,f=k.value,h=x.value,l=!t.checked,q=null;l&&(l=f==m&&h==m);if(!l&&null!=a.pages&&a.pages.length){var w=0,l=a.pages.length-1;t.checked||
+(w=parseInt(f)-1,l=parseInt(h)-1);for(var v=w;v<=l;v++){var n=a.pages[v],f=n==a.currentPage?g:null;if(null==f){var f=a.createTemporaryGraph(g.getStylesheet()),h=!0,w=!1,z=null,A=null;null==n.viewState&&null==n.root&&a.updatePageRoot(n);null!=n.viewState&&(h=n.viewState.pageVisible,w=n.viewState.mathEnabled,z=n.viewState.background,A=n.viewState.backgroundImage);f.background=z;f.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;f.pageVisible=h;f.mathEnabled=w;var E=f.getGlobalVariable;
+f.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?v+1:E.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(n);f.model.setRoot(n.root)}q=b(f,q,v!=l);f!=g&&f.container.parentNode.removeChild(f.container)}}else q=b(g);q.mathEnabled&&(l=q.wnd.document,l.writeln('<script type="text/x-mathjax-config">'),l.writeln("MathJax.Hub.Config({"),l.writeln("showMathMenu: false,"),l.writeln('messageStyle: "none",'),l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
l.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),l.writeln('"HTML-CSS": {'),l.writeln("imageFont: null"),l.writeln("},"),l.writeln("TeX: {"),l.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),l.writeln("},"),l.writeln("tex2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("},"),l.writeln("asciimath2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("}"),l.writeln("});"),c&&(l.writeln("MathJax.Hub.Queue(function () {"),
-l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script>"),l.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));p.closeDocument();!p.mathEnabled&&c&&PrintDialog.printPreview(p)}var g=a.editor.graph,h=document.createElement("div"),f=document.createElement("h3");f.style.width="100%";f.style.textAlign="center";f.style.marginTop="0px";mxUtils.write(f,c||mxResources.get("print"));h.appendChild(f);var l=1,m=1,p=document.createElement("div");
-p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);f=document.createElement("span");mxUtils.write(f,mxResources.get("printAllPages"));p.appendChild(f);mxUtils.br(p);var w=t.cloneNode(!0);t.setAttribute("checked","checked");w.setAttribute("value","range");
-p.appendChild(w);f=document.createElement("span");mxUtils.write(f,mxResources.get("pages")+":");p.appendChild(f);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";p.appendChild(k);f=document.createElement("span");mxUtils.write(f,mxResources.get("to"));p.appendChild(f);var x=k.cloneNode(!0);p.appendChild(x);mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(x,
-"focus",function(){w.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(x,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(f=0;f<a.pages.length;f++)if(a.currentPage==a.pages[f]){m=f+1;k.value=m;x.value=m;break}k.setAttribute("max",l);x.setAttribute("max",l);1<l&&h.appendChild(p);var v=document.createElement("div");v.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type",
-"radio");n.setAttribute("name","printZoom");v.appendChild(n);f=document.createElement("span");mxUtils.write(f,mxResources.get("adjustTo"));v.appendChild(f);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";v.appendChild(q);mxEvent.addListener(q,"focus",function(){n.checked=!0});h.appendChild(v);var p=p.cloneNode(!1),y=n.cloneNode(!0);y.setAttribute("value","fit");n.setAttribute("checked","checked");f=document.createElement("div");
-f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(y);p.appendChild(f);v=document.createElement("table");v.style.display="inline-block";var D=document.createElement("tbody"),r=document.createElement("tr"),u=r.cloneNode(!0),G=document.createElement("td"),T=G.cloneNode(!0),K=G.cloneNode(!0),O=G.cloneNode(!0),S=G.cloneNode(!0),ja=G.cloneNode(!0);G.style.textAlign="right";O.style.textAlign="right";mxUtils.write(G,mxResources.get("fitTo"));var C=document.createElement("input");
-C.style.cssText="margin:0 8px 0 8px;";C.setAttribute("value","1");C.setAttribute("min","1");C.setAttribute("type","number");C.style.width="40px";T.appendChild(C);f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsAcross"));K.appendChild(f);mxUtils.write(O,mxResources.get("fitToBy"));var da=C.cloneNode(!0);S.appendChild(da);mxEvent.addListener(C,"focus",function(){y.checked=!0});mxEvent.addListener(da,"focus",function(){y.checked=!0});f=document.createElement("span");mxUtils.write(f,
-mxResources.get("fitToSheetsDown"));ja.appendChild(f);r.appendChild(G);r.appendChild(T);r.appendChild(K);u.appendChild(O);u.appendChild(S);u.appendChild(ja);D.appendChild(r);D.appendChild(u);v.appendChild(D);p.appendChild(v);h.appendChild(p);p=document.createElement("div");f=document.createElement("div");f.style.fontWeight="bold";f.style.marginBottom="12px";mxUtils.write(f,mxResources.get("paperSize"));p.appendChild(f);f=document.createElement("div");f.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(f,
-"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(f);f=document.createElement("span");mxUtils.write(f,mxResources.get("pageScale"));p.appendChild(f);var Y=document.createElement("input");Y.style.cssText="margin:0 8px 0 8px;";Y.setAttribute("value","100 %");Y.style.width="60px";p.appendChild(Y);h.appendChild(p);f=document.createElement("div");f.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-p.className="geBtn";a.editor.cancelFirst&&f.appendChild(p);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){g.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",f.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),v.className="geBtn",f.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});v.className=
-"geBtn gePrimaryBtn";f.appendChild(v);a.editor.cancelFirst||f.appendChild(p);h.appendChild(f);this.container=h};var D=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=
-this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(D.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
-var ErrorDialog=function(a,b,f,d,k,n,q,r,u,c,g){u=null!=u?u:!0;var h=document.createElement("div");h.style.textAlign="center";if(null!=b){var l=document.createElement("div");l.style.padding="0px";l.style.margin="0px";l.style.fontSize="18px";l.style.paddingBottom="16px";l.style.marginBottom="16px";l.style.borderBottom="1px solid #c0c0c0";l.style.color="gray";l.style.whiteSpace="nowrap";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,b);l.setAttribute("title",b);h.appendChild(l)}b=
-document.createElement("div");b.style.padding="6px";b.innerHTML=f;h.appendChild(b);f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";null!=n&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();n()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=g&&g()}),c.className="geBtn",f.appendChild(c));var p=mxUtils.button(d,function(){u&&a.hideDialog();null!=k&&k()});p.className="geBtn";f.appendChild(p);
-null!=q&&(d=mxUtils.button(q,function(){u&&a.hideDialog();null!=r&&r()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){p.focus()};h.appendChild(f);this.container=h};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,d,f,p){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,d,f,p);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
+l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script>"),l.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));q.closeDocument();!q.mathEnabled&&c&&PrintDialog.printPreview(q)}var g=a.editor.graph,f=document.createElement("div"),h=document.createElement("h3");h.style.width="100%";h.style.textAlign="center";h.style.marginTop="0px";mxUtils.write(h,c||mxResources.get("print"));f.appendChild(h);var l=1,m=1,q=document.createElement("div");
+q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");q.appendChild(t);h=document.createElement("span");mxUtils.write(h,mxResources.get("printAllPages"));q.appendChild(h);mxUtils.br(q);var w=t.cloneNode(!0);t.setAttribute("checked","checked");w.setAttribute("value","range");
+q.appendChild(w);h=document.createElement("span");mxUtils.write(h,mxResources.get("pages")+":");q.appendChild(h);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";q.appendChild(k);h=document.createElement("span");mxUtils.write(h,mxResources.get("to"));q.appendChild(h);var x=k.cloneNode(!0);q.appendChild(x);mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(x,
+"focus",function(){w.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(x,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(h=0;h<a.pages.length;h++)if(a.currentPage==a.pages[h]){m=h+1;k.value=m;x.value=m;break}k.setAttribute("max",l);x.setAttribute("max",l);1<l&&f.appendChild(q);var v=document.createElement("div");v.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type",
+"radio");n.setAttribute("name","printZoom");v.appendChild(n);h=document.createElement("span");mxUtils.write(h,mxResources.get("adjustTo"));v.appendChild(h);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";v.appendChild(p);mxEvent.addListener(p,"focus",function(){n.checked=!0});f.appendChild(v);var q=q.cloneNode(!1),y=n.cloneNode(!0);y.setAttribute("value","fit");n.setAttribute("checked","checked");h=document.createElement("div");
+h.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";h.appendChild(y);q.appendChild(h);v=document.createElement("table");v.style.display="inline-block";var E=document.createElement("tbody"),r=document.createElement("tr"),u=r.cloneNode(!0),H=document.createElement("td"),U=H.cloneNode(!0),L=H.cloneNode(!0),P=H.cloneNode(!0),R=H.cloneNode(!0),ja=H.cloneNode(!0);H.style.textAlign="right";P.style.textAlign="right";mxUtils.write(H,mxResources.get("fitTo"));var D=document.createElement("input");
+D.style.cssText="margin:0 8px 0 8px;";D.setAttribute("value","1");D.setAttribute("min","1");D.setAttribute("type","number");D.style.width="40px";U.appendChild(D);h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsAcross"));L.appendChild(h);mxUtils.write(P,mxResources.get("fitToBy"));var ea=D.cloneNode(!0);R.appendChild(ea);mxEvent.addListener(D,"focus",function(){y.checked=!0});mxEvent.addListener(ea,"focus",function(){y.checked=!0});h=document.createElement("span");mxUtils.write(h,
+mxResources.get("fitToSheetsDown"));ja.appendChild(h);r.appendChild(H);r.appendChild(U);r.appendChild(L);u.appendChild(P);u.appendChild(R);u.appendChild(ja);E.appendChild(r);E.appendChild(u);v.appendChild(E);q.appendChild(v);f.appendChild(q);q=document.createElement("div");h=document.createElement("div");h.style.fontWeight="bold";h.style.marginBottom="12px";mxUtils.write(h,mxResources.get("paperSize"));q.appendChild(h);h=document.createElement("div");h.style.marginBottom="12px";var X=PageSetupDialog.addPageFormatPanel(h,
+"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(h);h=document.createElement("span");mxUtils.write(h,mxResources.get("pageScale"));q.appendChild(h);var Z=document.createElement("input");Z.style.cssText="margin:0 8px 0 8px;";Z.setAttribute("value","100 %");Z.style.width="60px";q.appendChild(Z);f.appendChild(q);h=document.createElement("div");h.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+q.className="geBtn";a.editor.cancelFirst&&h.appendChild(q);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){g.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",h.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),v.className="geBtn",h.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});v.className=
+"geBtn gePrimaryBtn";h.appendChild(v);a.editor.cancelFirst||h.appendChild(q);f.appendChild(h);this.container=f};var E=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=
+this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(E.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
+var ErrorDialog=function(a,b,f,d,k,n,p,r,u,c,g){u=null!=u?u:!0;var h=document.createElement("div");h.style.textAlign="center";if(null!=b){var l=document.createElement("div");l.style.padding="0px";l.style.margin="0px";l.style.fontSize="18px";l.style.paddingBottom="16px";l.style.marginBottom="16px";l.style.borderBottom="1px solid #c0c0c0";l.style.color="gray";l.style.whiteSpace="nowrap";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,b);l.setAttribute("title",b);h.appendChild(l)}b=
+document.createElement("div");b.style.padding="6px";b.innerHTML=f;h.appendChild(b);f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";null!=n&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();n()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=g&&g()}),c.className="geBtn",f.appendChild(c));var t=mxUtils.button(d,function(){u&&a.hideDialog();null!=k&&k()});t.className="geBtn";f.appendChild(t);
+null!=p&&(d=mxUtils.button(p,function(){u&&a.hideDialog();null!=r&&r()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){t.focus()};h.appendChild(f);this.container=h};
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,d,f,t){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,d,f,t);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/log?severity="+c+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
-":lnum:"+encodeURIComponent(d)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(x){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(h){}};EditorUi.sendReport=function(a,
+":lnum:"+encodeURIComponent(d)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}}catch(x){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(h){}};EditorUi.sendReport=function(a,
b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(h){}};EditorUi.debug=function(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
a)}};EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";
EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,
10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=
-!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");
-EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(m){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{b=document.createElement("canvas");b.width=b.height=1;var f=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=
-null!==f.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();
+!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");
+EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(m){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}try{b=document.createElement("canvas");b.width=b.height=1;var f=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=
+null!==f.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();
this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=
-d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=c.spin;c.spin=function(d,h){var f=!1;this.active||(g.call(this,d),this.active=!0,null!=h&&(f=document.createElement("div"),f.style.position="absolute",f.style.whiteSpace="nowrap",f.style.background="#4B4243",f.style.color="white",f.style.fontFamily="Helvetica, Arial",f.style.fontSize="9pt",f.style.padding="6px",
-f.style.paddingLeft="10px",f.style.paddingRight="10px",f.style.zIndex=2E9,f.style.left=Math.max(0,a)+"px",f.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(f.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=h.substring(h.length-3,h.length)&&(h+="..."),f.innerHTML=h,d.appendChild(f),c.status=f,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&
-(f.style.left=Math.round(Math.max(0,a-f.offsetWidth/2))+"px",f.style.top=Math.round(Math.max(0,b+70-f.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,h)}));this.stop();return a}),f=!0);return f};var h=c.stop;c.stop=function(){h.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,
-d){function c(a,c){var b=h;h+=c;return a.substring(b,h)}function g(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var h=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=g(a);var f=c(a,4);if(null!=b&&b(h-8,f,d))break;value=c(a,d);c(a,4);if("IEND"==f)break}while(d)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),
-b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(l){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var f=c.lastIndexOf("&lt;/mxfile&gt;");f>d&&(b=c.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var p=mxUtils.parseXml(c),
-m=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=m?mxUtils.getXml(m):""}catch(t){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=this.editor.graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
+d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=c.spin;c.spin=function(d,f){var h=!1;this.active||(g.call(this,d),this.active=!0,null!=f&&(h=document.createElement("div"),h.style.position="absolute",h.style.whiteSpace="nowrap",h.style.background="#4B4243",h.style.color="white",h.style.fontFamily="Helvetica, Arial",h.style.fontSize="9pt",h.style.padding="6px",
+h.style.paddingLeft="10px",h.style.paddingRight="10px",h.style.zIndex=2E9,h.style.left=Math.max(0,a)+"px",h.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(h.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(h.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=f.substring(f.length-3,f.length)&&(f+="..."),h.innerHTML=f,d.appendChild(h),c.status=h,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&
+(h.style.left=Math.round(Math.max(0,a-h.offsetWidth/2))+"px",h.style.top=Math.round(Math.max(0,b+70-h.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,f)}));this.stop();return a}),h=!0);return h};var f=c.stop;c.stop=function(){f.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,
+d){function c(a,c){var b=f;f+=c;return a.substring(b,f)}function g(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=g(a);var h=c(a,4);if(null!=b&&b(f-8,h,d))break;value=c(a,d);c(a,4);if("IEND"==h)break}while(d)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),
+b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(l){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var f=c.lastIndexOf("&lt;/mxfile&gt;");f>d&&(b=c.substring(d,f+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var t=mxUtils.parseXml(c),
+m=this.editor.extractGraphModel(t.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=m?mxUtils.getXml(m):""}catch(q){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=this.editor.graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var m=this.updatePageRoot(new DiagramPage(d[f]));null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[f+1]));
c.model.execute(new ChangePage(this,m,0==f?m:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(f=0;f<b.length;f++)c.model.execute(new ChangePage(this,
-b[f],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,f,p,m,t,k,w,n){b=null!=b?b:this.editor.graph;p=null!=p?p:!1;w=null!=w?w:!0;var c,g=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":g=c=f;if(null==a)return"";var h=a;if("mxfile"!=h.nodeName.toLowerCase()){var l=b.zapGremlins(mxUtils.getXml(a)),h=b.compress(l);if(b.decompress(h)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,
+b[f],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,f,t,m,q,k,w,n){b=null!=b?b:this.editor.graph;t=null!=t?t:!1;w=null!=w?w:!0;var c,g=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":g=c=f;if(null==a)return"";var h=a;if("mxfile"!=h.nodeName.toLowerCase()){var l=b.zapGremlins(mxUtils.getXml(a)),h=b.compress(l);if(b.decompress(h)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,
h);h=a.ownerDocument.createElement("mxfile");h.appendChild(l)}n?(h=h.cloneNode(!0),h.removeAttribute("userAgent"),h.removeAttribute("version"),h.removeAttribute("editor"),h.removeAttribute("type")):(h.removeAttribute("userAgent"),h.removeAttribute("version"),h.removeAttribute("editor"),h.removeAttribute("type"),h.setAttribute("modified",(new Date).toISOString()),h.setAttribute("host",window.location.hostname),h.setAttribute("agent",navigator.userAgent),h.setAttribute("version",EditorUi.VERSION),h.setAttribute("etag",
-Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&h.setAttribute("type",a));a=mxUtils.getXml(h);if(!m&&!p&&(t||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(h),b,null!=d?d.getTitle():null,c,g);else if(m||!p&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(f=null),a=this.getEmbeddedSvg(a,b,f,null,k,w,g);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);
+Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&h.setAttribute("type",a));a=mxUtils.getXml(h);if(!m&&!t&&(q||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(h),b,null!=d?d.getTitle():null,c,g);else if(m||!t&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(f=null),a=this.getEmbeddedSvg(a,b,f,null,k,w,g);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);
if(a&&null!=this.fileNode&&null!=this.currentPage)if(c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.currentPage.node,c),c=this.fileNode.cloneNode(!1),b)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){if(this.currentPage!=this.pages[d]&&this.pages[d].needsUpdate){var g=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[d].root));this.editor.graph.saveViewState(this.pages[d].viewState,
g);mxUtils.setTextContent(this.pages[d].node,this.editor.graph.compressNode(g));delete this.pages[d].needsUpdate}c.appendChild(this.pages[d].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],d=0;d<a.length;d++){var g=a.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(g)?c.push(g):isNaN(parseInt(g))?g.toLowerCase()!=g?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):g.toUpperCase()!=g?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(g)?
c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(m){a[EditorUi.DIFF_INSERT][c].data=m.message}if(null!=
@@ -2882,209 +2902,209 @@ a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var f=a[EditorUi.
c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<
a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),d=0;d<c.length;d++)null!=c[d].getAttribute("value")&&c[d].setAttribute("value","["+c[d].getAttribute("value").length+"]"),null!=c[d].getAttribute("style")&&c[d].setAttribute("style","["+c[d].getAttribute("style").length+"]"),null!=c[d].parentNode&&"root"!=c[d].parentNode.nodeName&&null!=c[d].parentNode.parentNode&&(c[d].setAttribute("id",c[d].parentNode.getAttribute("id")),
c[d].parentNode.parentNode.replaceChild(c[d],c[d].parentNode));c=a.getElementsByTagName("mxGeometry");for(d=0;d<c.length;d++)this.anonymizeAttributes(c[d],b);return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,
-function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,f,p,m,t,k,w){p=null!=p?p:!0;t=null!=t?t:this.getXmlFileData(p,null!=m?m:!1);w=null!=w?w:this.getCurrentFile();m=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&
-(b||!a&&null!=w&&/(\.svg)$/i.test(w.getTitle()))){m=this.createTemporaryGraph(m.getStylesheet());var c=m.getGlobalVariable,g=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(g.root)}a=this.createFileData(t,m,w,window.location.href,a,b,d,f,p,k);m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);return a};EditorUi.prototype.getHtml=function(a,b,d,f,p,m){m=null!=
-m?m:!0;var c=null,g="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=m?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;m=Math.floor(c.x/h-b.view.translate.x);h=Math.floor(c.y/h-b.view.translate.y);c=b.background;null==p&&(b=this.getBasenames().join(";"),0<b.length&&(g="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",m);a.setAttribute("y0",h)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit",
-"0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=f&&a.setAttribute("edit",f));null!=p&&(p=p.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";f=this.editor.graph.compress(a);this.editor.graph.decompress(f)!=a&&(f=encodeURIComponent(a));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==
-p?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+f+"</div>\n</div>\n"+(null==p?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-p+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,f,p){null!=p&&(p=p.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==p?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':
-'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=c&&0<c.length)throw a=mxResources.get("invalidOrMissingFile"),
+function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,f,t,m,q,k,w){t=null!=t?t:!0;q=null!=q?q:this.getXmlFileData(t,null!=m?m:!1);w=null!=w?w:this.getCurrentFile();m=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&
+(b||!a&&null!=w&&/(\.svg)$/i.test(w.getTitle()))){m=this.createTemporaryGraph(m.getStylesheet());var c=m.getGlobalVariable,g=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(g.root)}a=this.createFileData(q,m,w,window.location.href,a,b,d,f,t,k);m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);return a};EditorUi.prototype.getHtml=function(a,b,d,f,t,m){m=null!=
+m?m:!0;var c=null,g="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=m?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;m=Math.floor(c.x/h-b.view.translate.x);h=Math.floor(c.y/h-b.view.translate.y);c=b.background;null==t&&(b=this.getBasenames().join(";"),0<b.length&&(g="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",m);a.setAttribute("y0",h)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit",
+"0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=f&&a.setAttribute("edit",f));null!=t&&(t=t.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";f=this.editor.graph.compress(a);this.editor.graph.decompress(f)!=a&&(f=encodeURIComponent(a));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==
+t?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+f+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+t+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,f,t){null!=t&&(t=t.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==t?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':
+'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?a.getElementsByTagName("parsererror"):null;if(null!=c&&0<c.length)throw a=mxResources.get("invalidOrMissingFile"),
c=c[0].getElementsByTagName("div"),0<c.length&&(a=mxUtils.getTextContent(c[0])),Error(a);c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){this.fileNode=a;this.pages=[];for(a=0;a<c.length;a++){null==c[a].getAttribute("id")&&c[a].setAttribute("id",a);var b=new DiagramPage(c[a]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",
[a+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};
EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,
-b,d,f,p,m,t){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!p),g=c+"."+a;if("xml"==a){var h='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(f)):this.getFileData(!0,null,null,null,f,p));this.saveData(g,a,h,"text/xml")}else if("html"==a)h=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(g,a,h,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=
-c+".png":"jpeg"==a&&(g=c+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=m&&(this.editor.graph.pageVisible=m);var g=this.createDownloadRequest(c,a,f,b,t,p);this.editor.graph.pageVisible=d;return g}catch(z){this.handleError(z)}}));else{var l=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(l)}))});if("svg"==a){var n=this.editor.graph.background;if(t||n==mxConstants.NONE)n=null;var q=this.editor.graph.getSvg(n,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=c+".svg",l=this.getFileData(!1,
-!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),f)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,f,p,m){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==m?!1:"xmlpng"!=b);var g="",h="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";"pdf"==b&&0==m&&(h="&allPages=1");if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(m=
-0;m<this.pages.length;m++)if(this.pages[m]==this.currentPage){g="&from="+m;break}m=this.editor.graph.background;"png"==b&&p&&(m=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+g+h+"&bg="+(null!=m?m:mxConstants.NONE)+"&base64="+f+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,g=mxUtils.bind(this,function(d){var g=
+b,d,f,t,m,q){try{f=null!=f?f:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!t),g=c+"."+a;if("xml"==a){var h='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(f)):this.getFileData(!0,null,null,null,f,t));this.saveData(g,a,h,"text/xml")}else if("html"==a)h=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(g,a,h,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=
+c+".png":"jpeg"==a&&(g=c+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=m&&(this.editor.graph.pageVisible=m);var g=this.createDownloadRequest(c,a,f,b,q,t);this.editor.graph.pageVisible=d;return g}catch(z){this.handleError(z)}}));else{var l=null,k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+function(){mxUtils.popup(l)}))});if("svg"==a){var n=this.editor.graph.background;if(q||n==mxConstants.NONE)n=null;var p=this.editor.graph.getSvg(n,null,null,null,null,f);d&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=c+".svg",l=this.getFileData(!1,
+!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),f)}}catch(Q){this.handleError(Q)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,f,t,m){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==m?!1:"xmlpng"!=b);var g="",h="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";"pdf"==b&&0==m&&(h="&allPages=1");if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(m=
+0;m<this.pages.length;m++)if(this.pages[m]==this.currentPage){g="&from="+m;break}m=this.editor.graph.background;"png"==b&&t&&(m=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+g+h+"&bg="+(null!=m?m:mxConstants.NONE)+"&base64="+f+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,g=mxUtils.bind(this,function(d){var g=
null!=a.data?a.data:"";null!=d&&0<d.length&&(0<g.length&&(g+="\n"),g+=d);d=new LocalFile(this,"csv"!=a.format&&0<g.length?g:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==a.format&&this.importCsv(g,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,h=null,
l=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),m()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(h);h=window.setTimeout(l,f)});this.editor.addListener("pageSelected",
mxUtils.bind(this,function(){m();l()}));m();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.loadUrl(f,mxUtils.bind(this,function(a){g(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else g("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});
-return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,m=f.getModel();m.beginUpdate();var t=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=m.getCell(a.getAttribute("id"));if(null!=k){try{var w=a.getAttribute("value");if(null!=w){var n=mxUtils.parseXml(w).documentElement;if(null!=n)if("1"==n.getAttribute("replace-value"))m.setValue(k,n);else for(var q=n.attributes,v=0;v<
-q.length;v++)f.setAttributeForCell(k,q[v].nodeName,0<q[v].nodeValue.length?q[v].nodeValue:null)}}catch(B){null!=window.console&&console.log("Error in value for "+k.id+": "+B)}try{var A=a.getAttribute("style");null!=A&&f.model.setStyle(k,A)}catch(B){null!=window.console&&console.log("Error in style for "+k.id+": "+B)}try{var r=a.getAttribute("icon");if(null!=r){var u=0<r.length?JSON.parse(r):null;null!=u&&u.append||f.removeCellOverlays(k);null!=u&&f.addCellOverlay(k,c(u))}}catch(B){null!=window.console&&
-console.log("Error in icon for "+k.id+": "+B)}try{var E=a.getAttribute("geometry");if(null!=E){var E=JSON.parse(E),H=f.getCellGeometry(k);if(null!=H){H=H.clone();for(key in E){var L=parseFloat(E[key]);"dx"==key?H.x+=L:"dy"==key?H.y+=L:"dw"==key?H.width+=L:"dh"==key?H.height+=L:H[key]=parseFloat(E[key])}f.model.setGeometry(k,H)}}}catch(B){null!=window.console&&console.log("Error in icon for "+k.id+": "+B)}}}else if("model"==a.nodeName){for(var z=a.firstChild;null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
-z.nextSibling;null!=z&&(new mxCodec(a.firstChild)).decode(z,m)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(t=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{m.endUpdate()}null!=t&&this.chromelessResize&&this.chromelessResize(!0,
-t)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",g=c.lastIndexOf(".");0<=g&&(d=c.substring(g),c=c.substring(0,g));if(b)var f=new Date,g=f.getFullYear(),t=f.getMonth()+1,k=f.getDate(),w=f.getHours(),n=f.getMinutes(),f=f.getSeconds(),c=c+(" "+(g+"-"+t+"-"+k+"-"+w+"-"+n+"-"+f));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);
+return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,m=f.getModel();m.beginUpdate();var q=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=m.getCell(a.getAttribute("id"));if(null!=k){try{var w=a.getAttribute("value");if(null!=w){var n=mxUtils.parseXml(w).documentElement;if(null!=n)if("1"==n.getAttribute("replace-value"))m.setValue(k,n);else for(var p=n.attributes,v=0;v<
+p.length;v++)f.setAttributeForCell(k,p[v].nodeName,0<p[v].nodeValue.length?p[v].nodeValue:null)}}catch(B){null!=window.console&&console.log("Error in value for "+k.id+": "+B)}try{var A=a.getAttribute("style");null!=A&&f.model.setStyle(k,A)}catch(B){null!=window.console&&console.log("Error in style for "+k.id+": "+B)}try{var r=a.getAttribute("icon");if(null!=r){var u=0<r.length?JSON.parse(r):null;null!=u&&u.append||f.removeCellOverlays(k);null!=u&&f.addCellOverlay(k,c(u))}}catch(B){null!=window.console&&
+console.log("Error in icon for "+k.id+": "+B)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),I=f.getCellGeometry(k);if(null!=I){I=I.clone();for(key in F){var M=parseFloat(F[key]);"dx"==key?I.x+=M:"dy"==key?I.y+=M:"dw"==key?I.width+=M:"dh"==key?I.height+=M:I[key]=parseFloat(F[key])}f.model.setGeometry(k,I)}}}catch(B){null!=window.console&&console.log("Error in icon for "+k.id+": "+B)}}}else if("model"==a.nodeName){for(var z=a.firstChild;null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
+z.nextSibling;null!=z&&(new mxCodec(a.firstChild)).decode(z,m)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(q=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{m.endUpdate()}null!=q&&this.chromelessResize&&this.chromelessResize(!0,
+q)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",g=c.lastIndexOf(".");0<=g&&(d=c.substring(g),c=c.substring(0,g));if(b)var f=new Date,g=f.getFullYear(),q=f.getMonth()+1,k=f.getDate(),w=f.getHours(),n=f.getMinutes(),f=f.getSeconds(),c=c+(" "+(g+"-"+q+"-"+k+"-"+w+"-"+n+"-"+f));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);
var b=!1;this.hideDialog();null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display=
"none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+
"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&
-window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:"File",action:"open",label:a.getMode()+"."+a.getSize()});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(p){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
-1),mxSettings.save()}catch(p){}}catch(p){this.fileLoadedError=p;null!=window.console&&console.log("error in fileLoaded:",a,p);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=p&&null!=p.message?":err:"+encodeURIComponent(p.message):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}catch(m){}this.handleError(p,
+window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:"File",action:"open",label:a.getMode()+"."+a.getSize()});if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
+1),mxSettings.save()}catch(t){}}catch(t){this.fileLoadedError=t;null!=window.console&&console.log("error in fileLoaded:",a,t);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(m){}this.handleError(t,
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()}),!0)}else d();return b};EditorUi.prototype.isActive=function(){return this.editor.graph.isEditing()||this.editor.graph.isMouseDown||null!=this.dialog};EditorUi.prototype.runWhenIdle=function(a){if(this.isActive()){var c=mxUtils.bind(this,function(){this.isActive()||(this.editor.graph.removeMouseListener(b),
this.editor.removeListener("hideDialog",c),this.editor.graph.removeListener(c),null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a())}),b={mouseDown:function(){},mouseMove:function(){},mouseUp:c};this.editor.graph.addListener(mxEvent.EDITING_STOPPED,c);this.editor.graph.addListener(mxEvent.ESCAPE,c);this.editor.graph.addMouseListener(b);this.editor.addListener("hideDialog",c)}else null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a()};EditorUi.prototype.getHashValueForPages=
-function(a,b){var c=0,d=new mxGraphModel,g=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var t=a[f].node.cloneNode(!1);t.removeAttribute("name");d.root=a[f].root;var k=g.encode(d);this.editor.graph.saveViewState(a[f].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");t.appendChild(k);null!=b&&(b.eltCount+=t.getElementsByTagName("*").length,b.nodeCount+=t.getElementsByTagName("mxCell").length);
-c=(c<<5)-c+this.hashValue(t,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=
+function(a,b){var c=0,d=new mxGraphModel,g=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var q=a[f].node.cloneNode(!1);q.removeAttribute("name");d.root=a[f].root;var k=g.encode(d);this.editor.graph.saveViewState(a[f].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");q.appendChild(k);null!=b&&(b.eltCount+=q.getElementsByTagName("*").length,b.nodeCount+=q.getElementsByTagName("mxCell").length);
+c=(c<<5)-c+this.hashValue(q,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=
a.attributes.length);for(var g=0;g<a.attributes.length;g++){var f=a.attributes[g].name,h=null!=b?b(a,f,a.attributes[g].value,!0):a.attributes[g].value;null!=h&&(c^=this.hashValue(f,b,d)+this.hashValue(h,b,d))}}if(null!=a.childNodes)for(g=0;g<a.childNodes.length;g++)c=(c<<5)-c+this.hashValue(a.childNodes[g],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(g=0;g<a.length;g++)b=(b<<5)-b+a.charCodeAt(g)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=
-function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,f,p,m,t){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
+function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,f,t,m,q){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];
if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());
if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],
-c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=null,f=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign="center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),b.appendChild(g)):this.addLibraryEntries(c,b)});if(null!=this.sidebar&&null!=b)for(var h=
+c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});if(null!=this.sidebar&&null!=b)for(var h=
0;h<b.length;h++)mxUtils.bind(this,function(a){var c=a.data;null!=c&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){c=this.convertDataUri(c);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+c,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var c=this.stringToCells(this.editor.graph.decompress(a.xml));
-return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(c);var w=k.parentNode.previousSibling;d=w.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&w.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top=
-"0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");w.style.position="relative";var q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get("close"));q.setAttribute("valign","absmiddle");q.setAttribute("border","0");q.style.margin="0 3px";var v=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=
-mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var r=this.editor.graph,F=null,u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),E=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=F&&null!=F.parentNode&&F.parentNode.removeChild(F),F=q.cloneNode(!1),
-F.setAttribute("src",Editor.spinImage),F.setAttribute("title",mxResources.get("saving")),F.style.cursor="default",F.style.marginRight="2px",F.style.marginTop="-2px",n.insertBefore(F,n.firstChild),w.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=F&&null!=F.parentNode&&(F.parentNode.removeChild(F),w.style.paddingRight=18*n.childNodes.length+"px")})):null==v&&(v=q.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",
-mxResources.get("save")),n.insertBefore(v,n.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==v||a.isModified()||(w.style.paddingRight=18*n.childNodes.length+"px",v.parentNode.removeChild(v),v=null)});mxEvent.consume(c)})),w.style.paddingRight=18*n.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,f){a=r.cloneCells(mxUtils.sortCells(r.model.getTopmostCells(a)));for(var h=
-0;h<a.length;h++){var l=r.getCellGeometry(a[h]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);E(d);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),L=mxUtils.bind(this,function(a){if(r.isSelectionEmpty())r.getRubberband().isActive()?(r.getRubberband().execute(a),
-r.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=r.getSelectionCells(),b=r.view.getBounds(c),d=r.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=r.view.translate.x;b.y-=r.view.translate.y;H(c,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.panningManager&&null!=r.graphHandler.shape&&(r.graphHandler.shape.node.style.visibility=
-"hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",r.panningManager.stop(),r.autoScroll=!1,null!=r.graphHandler.guide&&r.graphHandler.guide.setVisible(!1),null!=r.graphHandler.hint&&(r.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.panningManager&&null!=r.graphHandler&&(k.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),
-k.style.cursor="default",this.sidebar.showTooltips=!0,r.panningManager.stop(),r.graphHandler.reset(),r.isMouseDown=!1,r.autoScroll=!0,L(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.graphHandler.shape&&(r.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",r.autoScroll=!0,null!=r.graphHandler.guide&&r.graphHandler.guide.setVisible(!0),null!=r.graphHandler.hint&&(r.graphHandler.hint.style.visibility=
-"visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=g&&(g.style.border=
-"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,h,l,m,p,t,w,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,p),c)],c[0].vertex=!0,H(c,new mxRectangle(0,0,m,p),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&
-0<b.length&&(g.parentNode.removeChild(g),g=null);else{var v=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var h=mxUtils.parseXml(c);if("mxlibrary"==h.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(h.documentElement));f(l,k);b=b.concat(l);E(a);this.spinner.stop();v=!0}catch(C){}else if("mxfile"==h.documentElement.nodeName)try{for(var m=h.documentElement.getElementsByTagName("diagram"),h=0;h<m.length;h++){var l=mxUtils.getTextContent(m[h]),p=this.stringToCells(this.editor.graph.decompress(l)),
-t=this.editor.graph.getBoundingBoxFromGeometry(p);H(p,new mxRectangle(0,0,t.width,t.height),a)}v=!0}catch(C){null!=window.console&&console.log("error in drop handler:",C)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=n&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(n,function(a){x(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(c,t)&&null!=n?this.parseFile(n,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",
-k.style.cursor="");a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));n.insertBefore(q,n.firstChild);mxEvent.addListener(q,"click",u);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&u(a)});d=q.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));n.insertBefore(d,n.firstChild);mxEvent.addListener(d,"click",L);this.isOffline()||".scratchpad"!=
+return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);d=null!=d&&0<d.length?d:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var w=k.parentNode.previousSibling;d=w.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&w.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top=
+"0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");w.style.position="relative";var p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get("close"));p.setAttribute("valign","absmiddle");p.setAttribute("border","0");p.style.margin="0 3px";var v=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=
+mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var r=this.editor.graph,G=null,u=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=G&&null!=G.parentNode&&G.parentNode.removeChild(G),G=p.cloneNode(!1),
+G.setAttribute("src",Editor.spinImage),G.setAttribute("title",mxResources.get("saving")),G.style.cursor="default",G.style.marginRight="2px",G.style.marginTop="-2px",n.insertBefore(G,n.firstChild),w.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=G&&null!=G.parentNode&&(G.parentNode.removeChild(G),w.style.paddingRight=18*n.childNodes.length+"px")})):null==v&&(v=p.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",
+mxResources.get("save")),n.insertBefore(v,n.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==v||a.isModified()||(w.style.paddingRight=18*n.childNodes.length+"px",v.parentNode.removeChild(v),v=null)});mxEvent.consume(c)})),w.style.paddingRight=18*n.childNodes.length+"px")}),I=mxUtils.bind(this,function(a,c,d,g){a=r.cloneCells(mxUtils.sortCells(r.model.getTopmostCells(a)));for(var h=
+0;h<a.length;h++){var l=r.getCellGeometry(a[h]);null!=l&&l.translate(-c.x,-c.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,g||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=g&&(a.title=g);b.push(a);F(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),M=mxUtils.bind(this,function(a){if(r.isSelectionEmpty())r.getRubberband().isActive()?(r.getRubberband().execute(a),
+r.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=r.getSelectionCells(),b=r.view.getBounds(c),d=r.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=r.view.translate.x;b.y-=r.view.translate.y;I(c,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.panningManager&&null!=r.graphHandler.shape&&(r.graphHandler.shape.node.style.visibility=
+"hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",r.panningManager.stop(),r.autoScroll=!1,null!=r.graphHandler.guide&&r.graphHandler.guide.setVisible(!1),null!=r.graphHandler.hint&&(r.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.panningManager&&null!=r.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),
+k.style.cursor="default",this.sidebar.showTooltips=!0,r.panningManager.stop(),r.graphHandler.reset(),r.isMouseDown=!1,r.autoScroll=!0,M(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){r.isMouseDown&&null!=r.graphHandler.shape&&(r.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",r.autoScroll=!0,null!=r.graphHandler.guide&&r.graphHandler.guide.setVisible(!0),null!=r.graphHandler.hint&&(r.graphHandler.hint.style.visibility=
+"visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border=
+"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,h,l,m,q,t,w,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,q),c)],c[0].vertex=!0,I(c,new mxRectangle(0,0,m,q),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&
+0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var h=mxUtils.parseXml(c);if("mxlibrary"==h.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(h.documentElement));g(l,k);b=b.concat(l);F(a);this.spinner.stop();v=!0}catch(D){}else if("mxfile"==h.documentElement.nodeName)try{for(var m=h.documentElement.getElementsByTagName("diagram"),h=0;h<m.length;h++){var l=mxUtils.getTextContent(m[h]),q=this.stringToCells(this.editor.graph.decompress(l)),
+t=this.editor.graph.getBoundingBoxFromGeometry(q);I(q,new mxRectangle(0,0,t.width,t.height),a)}v=!0}catch(D){null!=window.console&&console.log("error in drop handler:",D)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=n&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(n,function(a){x(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,t)&&null!=n?this.parseFile(n,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",
+k.style.cursor="");a.stopPropagation();a.preventDefault()}));p=p.cloneNode(!1);p.setAttribute("src",Editor.editImage);p.setAttribute("title",mxResources.get("edit"));n.insertBefore(p,n.firstChild);mxEvent.addListener(p,"click",u);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&u(a)});d=p.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));n.insertBefore(d,n.firstChild);mxEvent.addListener(d,"click",M);this.isOffline()||".scratchpad"!=
a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),n.insertBefore(d,n.firstChild))}w.appendChild(n);w.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=
-0;c<a.length;c++){var d=a[c],g=d.data;if(null!=g){var g=this.convertDataUri(g),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+g,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(g=this.stringToCells(this.editor.graph.decompress(d.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
+0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(this.editor.graph.decompress(d.xml)),0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=
function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.offline||EditorUi.isElectronApp||("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.createFooter=function(){return document.getElementById("geFooter")});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),
Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor=
"#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display=
-"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,f,p){a=new ImageDialog(this,a,b,d,f,p);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
-!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,f,p){a=new LibraryDialog(this,a,b,d,f,p);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
+"none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,f,k){a=new ImageDialog(this,a,b,d,f,k);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=
+!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,f,k){a=new LibraryDialog(this,a,b,d,f,k);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");
a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();
mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,f){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=g||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var h=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=g)if(null!=g.retry&&(h=mxResources.get("cancel"),l=function(){c();g.retry()}),404==g.code||404==g.status||403==g.code){a=403==
g.code?null!=g.message?mxUtils.htmlEntities(g.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+='<br><a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else null!=g.message?a=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error?a=mxUtils.htmlEntities(g.response.error):
-"undefined"!==window.App&&(g.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,h,d,l,null,null,null,null,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,f,p,m,t,k,w,n,q,v,r){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),f,p,m,t,v,k,w);this.showDialog(a.container,n||340,q||(null!=b&&120<b.length?180:150),!0,!1,r);a.init()};EditorUi.prototype.alert=
-function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,f,p,m){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},f,p);this.showDialog(a.container,340,90,!0,m);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=
+"undefined"!==window.App&&(g.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,h,d,l,null,null,null,null,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,f,k,m,q,n,w,p,r,v,A){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),f,k,m,q,v,n,w);this.showDialog(a.container,p||340,r||(null!=b&&120<b.length?180:150),!0,!1,A);a.init()};EditorUi.prototype.alert=
+function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,f,k,m){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},f,k);this.showDialog(a.container,340,90,!0,m);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=
function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,
-"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,g=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(g,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&
-!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,p){if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,
+"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&
+!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,f,k){if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,
b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else{var c=document.createElement("a"),g=!mxClient.IS_SF&&0>navigator.userAgent.indexOf("PaleMoon/")&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var h=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),g=65==(h?parseInt(h[2],10):!1)?!1:g;if(g||this.isOffline()){c.href=URL.createObjectURL(f?this.base64ToBlob(a,
-d):new Blob([a],{type:d}));g?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(w){}}else this.createEchoRequest(a,b,d,f,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,f,p,m){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=p?"&format="+p:"")+(null!=m?"&base64="+m:"")+(null!=b?"&filename="+
-encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,g=Math.ceil(d/1024),f=Array(g),t=0;t<g;++t){for(var k=1024*t,w=Math.min(k+1024,d),n=Array(w-k),q=0;k<w;++q,++k)n[q]=c[k].charCodeAt(0);f[t]=new Uint8Array(n)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,f,p,m,t){m=null!=m?m:!1;t=null!=t?t:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(m);b=new CreateDialog(this,
+d):new Blob([a],{type:d}));g?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(w){}}else this.createEchoRequest(a,b,d,f,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,f,k,m){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=k?"&format="+k:"")+(null!=m?"&base64="+m:"")+(null!=b?"&filename="+
+encodeURIComponent(b):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),g=Array(f),q=0;q<f;++q){for(var k=1024*q,w=Math.min(k+1024,d),n=Array(w-k),p=0;k<w;++p,++k)n[p]=c[k].charCodeAt(0);g[q]=new Uint8Array(n)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,f,k,m,q){m=null!=m?m:!1;q=null!=q?q:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(m);b=new CreateDialog(this,
b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a,!1)),g.document.close())}else this.openInNewWindow(a,d,f);else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,f):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(g){try{this.exportFile(a,c,d,f,b,g)}catch(v){this.handleError(v)}}))}catch(y){this.handleError(y)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,t,null,1<p,4<p&&(!m||6>p)?3:4,a,d,f);this.showDialog(b.container,420,1==p?160:4<p?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,m,q,null,1<k,4<k&&(!m||6>k)?3:4,a,d,f);this.showDialog(b.container,420,1==k?160:4<k?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+
b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);
null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
-"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var g=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});g.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){g.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));
+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));
a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,
-arguments)};EditorUi.prototype.saveData=function(a,b,d,f,p){this.isLocalFileSave()?this.saveLocalFile(d,a,f,p,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,f,p,b,c)}),d,p,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,p,m,t){t=null!=t?t:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var g=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==
+arguments)};EditorUi.prototype.saveData=function(a,b,d,f,k){this.isLocalFileSave()?this.saveLocalFile(d,a,f,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,f,k,b,c)}),d,k,f)};EditorUi.prototype.saveRequest=function(a,b,d,f,k,m,q){q=null!=q?q:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var g=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==
c||null==c||"_blank"==c?"0":"1");null!=g&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?g.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){m=null!=m?m:"pdf"==b?"application/pdf":"image/"+b;if(null!=f)try{this.exportFile(f,a,m,!0,c,d)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=g.getStatus()&&299>=g.getStatus())try{this.exportFile(g.getText(),a,m,!0,c,d)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,t,null,1<c,4<c?3:4,f,m,p);this.showDialog(a.container,380,1==c?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,f,p,m){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,f,p,m,t,
-k,n,q){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var g=this.editor.graph.getSvg(c,a,t,k,null,d,null,null,"blank"==q?"_blank":"self"==q?"_top":null);f&&this.editor.graph.addSvgShadow(g,g);var h=this.getBaseFilename()+".svg",l=mxUtils.bind(this,function(a){this.spinner.stop();p&&a.setAttribute("content",this.getFileData(!0,null,
-null,null,d,n));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",b,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,g,!1,mxUtils.bind(this,function(){m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,l,this.thumbImageCache)):l(g)}))}};EditorUi.prototype.addRadiobox=function(a,b,d,f,p,m,t){return this.addCheckbox(a,d,f,p,m,t,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,f,p,m,t,k){m=null!=m?m:!0;var c=document.createElement("input");
-c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",t?"radio":"checkbox");t="geCheckbox-"+Editor.guid();c.id=t;null!=k&&c.setAttribute("name",k);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");m&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",t),a.appendChild(d),p||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+
-":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),g="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(g=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,
-mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,g,mxResources.get("ok"),function(a){null!=a?g=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled",
-"disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":g:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){t.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+
-"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));d.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));d.appendChild(g);g=document.createElement("option");
-g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));d.appendChild(g);b&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(g));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",t=null,t=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();t.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";t.style.marginLeft="4px";t.style.height="22px";t.style.width="22px";t.style.position="relative";t.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";t.className="geColorBtn";a.appendChild(t);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,f,p,m,t,k){var c=this.getCurrentFile(),g=[];f&&(g.push("lightbox=1"),"auto"!=a&&g.push("target="+
-a),null!=b&&b!=mxConstants.NONE&&g.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=p&&0<p.length&&g.push("edit="+encodeURIComponent(p)),m&&g.push("layers=1"),this.editor.graph.foldingEnabled&&g.push("nav=1"));d&&(a=this.getSelectedPageIndex(),0<a&&g.push("page="+a));a=!0;null!=t?d="#U"+encodeURIComponent(t):(c=this.getCurrentFile(),k||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&g.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<g.length?"?"+g.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,p,m,t,k,n,q,r){this.getBasenames();var c={};""!=p&&p!=mxConstants.NONE&&(c.highlight=p);"auto"!==f&&(c.target=f);
-n||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];t&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);k&&d.push("layers");0<d.length&&(n&&d.push("lightbox"),c.toolbar=d.join(" "));null!=q&&0<q.length&&(c.edit=q);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!t);b='<div class="mxgraph" style="'+(m?"max-width:100%;":
+function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,q,null,1<c,4<c?3:4,f,m,k);this.showDialog(a.container,380,1==c?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,f,k,m){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,f,k,m,q,
+n,w,p){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var g=this.editor.graph.getSvg(c,a,q,n,null,d,null,null,"blank"==p?"_blank":"self"==p?"_top":null);f&&this.editor.graph.addSvgShadow(g,g);var h=this.getBaseFilename()+".svg",l=mxUtils.bind(this,function(a){this.spinner.stop();k&&a.setAttribute("content",this.getFileData(!0,null,
+null,null,d,w));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",b,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,g,!1,mxUtils.bind(this,function(){m?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,l,this.thumbImageCache)):l(g)}))}};EditorUi.prototype.addRadiobox=function(a,b,d,f,k,m,q){return this.addCheckbox(a,d,f,k,m,q,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,f,k,m,q,n){m=null!=m?m:!0;var c=document.createElement("input");
+c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",q?"radio":"checkbox");q="geCheckbox-"+Editor.guid();c.id=q;null!=n&&c.setAttribute("name",n);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);f&&c.setAttribute("disabled","disabled");m&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",q),a.appendChild(d),k||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+
+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));g.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,
+mxResources.get("custom")+"...");g.appendChild(d);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled",
+"disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===g.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){q.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+
+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",q=null,q=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;c()});mxEvent.consume(a)}));c();q.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";q.style.marginLeft="4px";q.style.height="22px";q.style.width="22px";q.style.position="relative";q.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";q.className="geColorBtn";a.appendChild(q);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,f,k,m,q,n){var c=this.getCurrentFile(),g=[];f&&(g.push("lightbox=1"),"auto"!=a&&g.push("target="+
+a),null!=b&&b!=mxConstants.NONE&&g.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=k&&0<k.length&&g.push("edit="+encodeURIComponent(k)),m&&g.push("layers=1"),this.editor.graph.foldingEnabled&&g.push("nav=1"));d&&(a=this.getSelectedPageIndex(),0<a&&g.push("page="+a));a=!0;null!=q?d="#U"+encodeURIComponent(q):(c=this.getCurrentFile(),n||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&g.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<g.length?"?"+g.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,f,k,m,q,n,w,p,r){this.getBasenames();var c={};""!=k&&k!=mxConstants.NONE&&(c.highlight=k);"auto"!==f&&(c.target=f);
+w||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];q&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);n&&d.push("layers");0<d.length&&(w&&d.push("lightbox"),c.toolbar=d.join(" "));null!=p&&0<p.length&&(c.edit=p);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!q);b='<div class="mxgraph" style="'+(m?"max-width:100%;":
"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";r(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,f){var c=document.createElement("div");
c.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(g);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name",
"type-embedhtmldialog");g=l.cloneNode(!0);g.setAttribute("value","copy");h.appendChild(g);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(k);mxUtils.br(h);h.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));h.appendChild(k);var n=this.getCurrentFile();null==d&&null!=n&&n.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href",
-"javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),h.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));g.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(h);var q=this.addLinkSection(c),v=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";
-r.style.width="60px";r.style.marginLeft="4px";r.style.marginRight="12px";r.value="100%";c.appendChild(r);var F=this.addCheckbox(c,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),h,!h),E=this.addCheckbox(c,mxResources.get("layers"),!0),H=this.addCheckbox(c,mxResources.get("lightbox"),!0),L=this.addEditButton(c,H),z=L.getEditInput();z.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?z.removeAttribute("disabled"):
-z.setAttribute("disabled","disabled");z.checked&&H.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(l.checked?d:null,v.checked,r.value,q.getTarget(),q.getColor(),F.checked,u.checked,E.checked,H.checked,L.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,p,m){var c=document.createElement("div");c.style.whiteSpace=
+"javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),h.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));g.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(h);var p=this.addLinkSection(c),v=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";
+r.style.width="60px";r.style.marginLeft="4px";r.style.marginRight="12px";r.value="100%";c.appendChild(r);var G=this.addCheckbox(c,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),h,!h),F=this.addCheckbox(c,mxResources.get("layers"),!0),I=this.addCheckbox(c,mxResources.get("lightbox"),!0),M=this.addEditButton(c,I),z=M.getEditInput();z.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?z.removeAttribute("disabled"):
+z.setAttribute("disabled","disabled");z.checked&&I.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){f(l.checked?d:null,v.checked,r.value,p.getTarget(),p.getColor(),G.checked,u.checked,F.checked,I.checked,M.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,f,k,m){var c=document.createElement("div");c.style.whiteSpace=
"nowrap";var g=document.createElement("h3");mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(g);var h=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=h&&h.constructor==window.DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var k=document.createElement("div");k.style.whiteSpace="normal";mxUtils.write(k,mxResources.get("linkAccountRequired"));l.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));k.style.marginTop="12px";k.className="geBtn";l.appendChild(k);c.appendChild(l);k=document.createElement("a");k.style.paddingLeft="12px";k.style.color="gray";k.style.fontSize="11px";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("check"));
-l.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,q=null;if(null!=d||null!=f)a+=30,mxUtils.write(c,mxResources.get("width")+":"),n=document.createElement("input"),
-n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",c.appendChild(n),mxUtils.write(c,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=f+"px",c.appendChild(q),mxUtils.br(c);var r=this.addLinkSection(c,m);d=null!=this.pages&&1<this.pages.length;var u=null;
-if(null==h||h.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var E=this.addCheckbox(c,mxResources.get("lightbox"),!0),H=this.addEditButton(c,E),L=H.getEditInput(),z=this.addCheckbox(c,mxResources.get("layers"),!0);z.style.marginLeft=L.style.marginLeft;z.style.marginBottom="16px";z.style.marginTop="8px";mxEvent.addListener(E,"change",function(){E.checked?(z.removeAttribute("disabled"),L.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),L.setAttribute("disabled",
-"disabled"));L.checked&&E.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){p(r.getTarget(),r.getColor(),null==u?!0:u.checked,E.checked,H.getLink(),z.checked,null!=n?n.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():
+var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));l.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));n.style.marginTop="12px";n.className="geBtn";l.appendChild(n);c.appendChild(l);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));
+l.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var t=null,p=null;if(null!=d||null!=f)a+=30,mxUtils.write(c,mxResources.get("width")+":"),t=document.createElement("input"),
+t.setAttribute("type","text"),t.style.marginRight="16px",t.style.width="50px",t.style.marginLeft="6px",t.style.marginRight="16px",t.style.marginBottom="10px",t.value="100%",c.appendChild(t),mxUtils.write(c,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=f+"px",c.appendChild(p),mxUtils.br(c);var r=this.addLinkSection(c,m);d=null!=this.pages&&1<this.pages.length;var u=null;
+if(null==h||h.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var F=this.addCheckbox(c,mxResources.get("lightbox"),!0),I=this.addEditButton(c,F),M=I.getEditInput(),z=this.addCheckbox(c,mxResources.get("layers"),!0);z.style.marginLeft=M.style.marginLeft;z.style.marginBottom="16px";z.style.marginTop="8px";mxEvent.addListener(F,"change",function(){F.checked?(z.removeAttribute("disabled"),M.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),M.setAttribute("disabled",
+"disabled"));M.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){k(r.getTarget(),r.getColor(),null==u?!0:u.checked,F.checked,I.getLink(),z.checked,null!=t?t.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():
document.execCommand("selectAll",!1,null)):r.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g);var h=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=f?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
-!0),g=this.editor.graph,k=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!h.checked,null!=l?l.checked:!1,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,f?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,f,k,m,t,n){t=null!=t?t:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=
-this.editor.graph,h="jpeg"==n?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(l);mxUtils.write(c,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";c.appendChild(p);mxUtils.write(c,mxResources.get("borderWidth")+":");
-var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";c.appendChild(q);mxUtils.br(c);var r=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),x=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled",
-"disabled");u.setAttribute("type","checkbox");m&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),h+=26,mxEvent.addListener(x,"change",function(){x.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var L=this.addCheckbox(c,mxResources.get("shadow"),g.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type",
-"checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(c.appendChild(z),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),h+=26);var B=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),t,null,null,"jpeg"!=n),J=null!=this.pages&&1<this.pages.length,N=this.addCheckbox(c,J?mxResources.get("allPages"):"",J,!J,null,"jpeg"!=n);N.style.marginLeft="24px";N.style.marginBottom="16px";J||(N.style.display="none");mxEvent.addListener(B,"change",function(){B.checked&&
-J?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")});t&&J||N.setAttribute("disabled","disabled");var R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginRight="10px";R.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));R.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));R.appendChild(a);
-a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));R.appendChild(a);"svg"==n&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(R),mxUtils.br(c),mxUtils.br(c),h+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=p.value;k(p.value,r.checked,!x.checked,L.checked,B.checked,z.checked,q.value,u.checked,!N.checked,R.value)}),null,d,f);this.showDialog(d.container,340,
-h,!0,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,f,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(h)}var l=this.addCheckbox(c,mxResources.get("fit"),
-!0),p=this.addCheckbox(c,mxResources.get("shadow"),g.shadowVisible&&f,!f),n=this.addCheckbox(c,d),v=this.addCheckbox(c,mxResources.get("lightbox"),!0),q=this.addEditButton(c,v),r=q.getEditInput(),u=1<g.model.getChildCount(g.model.getRoot()),E=this.addCheckbox(c,mxResources.get("layers"),u,!u);E.style.marginLeft=r.style.marginLeft;E.style.marginBottom="12px";E.style.marginTop="8px";mxEvent.addListener(v,"change",function(){v.checked?(u&&E.removeAttribute("disabled"),r.removeAttribute("disabled")):
-(E.setAttribute("disabled","disabled"),r.setAttribute("disabled","disabled"));r.checked&&v.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(l.checked,p.checked,n.checked,v.checked,q.getLink(),E.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,k,m,t,n){function c(c){var b=" ",h="";f&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var l="";d&&(l=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');t('<img src="'+c+'"'+l+(""!=h?' style="'+h+'"':"")+b+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),
+!0),g=this.editor.graph,k=f?null:this.addCheckbox(c,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!h.checked,null!=l?l.checked:!1,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,f?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,f,k,m,q,n){q=null!=q?q:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=
+this.editor.graph,h="jpeg"==n?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(l);mxUtils.write(c,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";c.appendChild(t);mxUtils.write(c,mxResources.get("borderWidth")+":");
+var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";c.appendChild(p);mxUtils.br(c);var r=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),x=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled",
+"disabled");u.setAttribute("type","checkbox");m&&(c.appendChild(u),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),h+=26,mxEvent.addListener(x,"change",function(){x.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var M=this.addCheckbox(c,mxResources.get("shadow"),g.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type",
+"checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(c.appendChild(z),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),h+=26);var B=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),q,null,null,"jpeg"!=n),K=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(c,K?mxResources.get("allPages"):"",K,!K,null,"jpeg"!=n);O.style.marginLeft="24px";O.style.marginBottom="16px";K||(O.style.display="none");mxEvent.addListener(B,"change",function(){B.checked&&
+K?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});q&&K||O.setAttribute("disabled","disabled");var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginRight="10px";T.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));T.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));T.appendChild(a);
+a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));T.appendChild(a);"svg"==n&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(T),mxUtils.br(c),mxUtils.br(c),h+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=t.value;k(t.value,r.checked,!x.checked,M.checked,B.checked,z.checked,p.value,u.checked,!O.checked,T.value)}),null,d,f);this.showDialog(d.container,340,
+h,!0,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,f,k){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(h)}var l=this.addCheckbox(c,mxResources.get("fit"),
+!0),n=this.addCheckbox(c,mxResources.get("shadow"),g.shadowVisible&&f,!f),t=this.addCheckbox(c,d),v=this.addCheckbox(c,mxResources.get("lightbox"),!0),p=this.addEditButton(c,v),r=p.getEditInput(),u=1<g.model.getChildCount(g.model.getRoot()),F=this.addCheckbox(c,mxResources.get("layers"),u,!u);F.style.marginLeft=r.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(v,"change",function(){v.checked?(u&&F.removeAttribute("disabled"),r.removeAttribute("disabled")):
+(F.setAttribute("disabled","disabled"),r.setAttribute("disabled","disabled"));r.checked&&v.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(l.checked,n.checked,t.checked,v.checked,p.getLink(),F.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,f,k,m,q,n){function c(c){var b=" ",h="";f&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var l="";d&&(l=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');q('<img src="'+c+'"'+l+(""!=h?' style="'+h+'"':"")+b+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=f?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),
null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),g.width*g.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";d&&(h="&w="+Math.round(2*g.width)+"&h="+Math.round(2*g.height));var l=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(f?"1":"0")+h+"&xml="+encodeURIComponent(b));l.send(mxUtils.bind(this,function(){200<=l.getStatus()&&299>=l.getStatus()?c("data:image/png;base64,"+l.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,f,k,m,t){var c=this.editor.graph.getSvg(),g=c.getElementsByTagName("a");if(null!=g)for(var h=0;h<g.length;h++){var l=g[h].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==g[h].getAttribute("target")&&g[h].removeAttribute("target")}f&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var p=" ",n="";f&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){t('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+p+"/>")}))}else n="",f&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=n&&c.setAttribute("style",n),t(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
+EditorUi.prototype.createEmbedSvg=function(a,b,d,f,k,m,q){var c=this.editor.graph.getSvg(),g=c.getElementsByTagName("a");if(null!=g)for(var h=0;h<g.length;h++){var l=g[h].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==g[h].getAttribute("target")&&g[h].removeAttribute("target")}f&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",t="";f&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");a&&(t+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){q('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=t?' style="'+t+'"':"")+n+"/>")}))}else t="",f&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(m?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),t+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=t&&c.setAttribute("style",t),q(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,f){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,
-function(){f()}))}),0)):f()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],g=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:g.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=
-this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(m){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),g=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
-f=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(g)));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(D){null!=
-b&&b(D)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,k,m,t){t=b.background;t==mxConstants.NONE&&(t=null);b=b.getSvg(t,null,null,null,null,m);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,f,k,m,t,n,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,n):null,q)}catch(v){"Invalid image"==v.message?this.downloadFile(q):this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,m,t)}catch(y){this.spinner.stop(),this.handleError(y)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
-"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,f={},m=mxUtils.bind(this,function(){if(0==d){for(var g=[b[0]],h=1;h<b.length;h++){var l=b[h].indexOf(")");g.push('url("');g.push(f[c(b[h].substring(0,l))]);g.push('"'+b[h].substring(l))}this.editor.resolvedFontCss=g.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var n=b[k].indexOf(")"),q=null,r=b[k].indexOf("format(",n);0<r&&(q=c(b[k].substring(r+7,b[k].indexOf(")",r))));mxUtils.bind(this,function(a){if(null==
-f[a]){f[a]=a;d++;var c="application/x-font-ttf";if("svg"==q||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==q||"embedded-opentype"==q||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==q||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==q||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==q||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==q||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
-a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){f[a]=c;d--;m()}),mxUtils.bind(this,function(a){d--;m()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,n)),q)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,f,k,m,t,n,q,r,y,v,A,u){m=null!=m?m:!0;v=null!=v?v:this.editor.graph;A=null!=A?A:0;var c=q?null:v.background;c==mxConstants.NONE&&(c=null);null==c&&(c=f);null==c&&0==q&&
-(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(v.getSvg(c,null,null,u,null,null!=t?t:!0,null,null,null,r),mxUtils.bind(this,function(d){var g=new Image;g.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),h=parseInt(d.getAttribute("width")),l=parseInt(d.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=m?Math.min(1,Math.min(3*b/(4*l),b/h)):b/h);h=Math.ceil(n*h)+2*A;l=Math.ceil(n*l)+2*A;f.setAttribute("width",h);f.setAttribute("height",l);var p=f.getContext("2d");
-null!=c&&(p.beginPath(),p.rect(0,0,h,l),p.fillStyle=c,p.fill());p.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){p.drawImage(g,A/n,A/n);a(f)},0):(p.drawImage(g,A/n,A/n),a(f))}catch(R){null!=k&&k(R)}});g.onerror=function(a){null!=k&&k(a)};try{r&&this.editor.graph.addSvgShadow(d,d);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(v,
-d,!0,mxUtils.bind(this,function(){g.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(f)}catch(z){null!=k&&k(z)}}),d,y)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var g="http://"==c.substring(0,7)||"https://"==c.substring(0,8);g&&!navigator.onLine?c=d.svgBrokenImage.src:!g||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.isCorsEnabledForUrl(c)?"chrome-extension://"!=
+function(){f()}))}),0)):f()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=
+this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(m){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),
+g=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var g=d.toDataURL("image/png"),g=this.writeGraphModelToPng(g,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(g.substring(g.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=
+b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,f,k,m,q){q=b.background;q==mxConstants.NONE&&(q=null);b=b.getSvg(q,null,null,null,null,m);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,f,k,m,q,n,w){w=null!=w?w:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
+try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,n):null,w)}catch(v){"Invalid image"==v.message?this.downloadFile(w):this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,f,null,null,m,q)}catch(y){this.spinner.stop(),this.handleError(y)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
+"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,f={},m=mxUtils.bind(this,function(){if(0==d){for(var g=[b[0]],h=1;h<b.length;h++){var l=b[h].indexOf(")");g.push('url("');g.push(f[c(b[h].substring(0,l))]);g.push('"'+b[h].substring(l))}this.editor.resolvedFontCss=g.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var n=b[k].indexOf(")"),w=null,p=b[k].indexOf("format(",n);0<p&&(w=c(b[k].substring(p+7,b[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==
+f[a]){f[a]=a;d++;var c="application/x-font-ttf";if("svg"==w||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==w||"embedded-opentype"==w||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==w||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==w||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==w||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==w||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=
+a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){f[a]=c;d--;m()}),mxUtils.bind(this,function(a){d--;m()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,n)),w)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,f,k,m,q,n,p,r,y,v,A,u){m=null!=m?m:!0;v=null!=v?v:this.editor.graph;A=null!=A?A:0;var c=p?null:v.background;c==mxConstants.NONE&&(c=null);null==c&&(c=f);null==c&&0==p&&
+(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(v.getSvg(c,null,null,u,null,null!=q?q:!0,null,null,null,r),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),h=parseInt(d.getAttribute("width")),l=parseInt(d.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=m?Math.min(1,Math.min(3*b/(4*l),b/h)):b/h);h=Math.ceil(n*h)+2*A;l=Math.ceil(n*l)+2*A;g.setAttribute("width",h);g.setAttribute("height",l);var q=g.getContext("2d");
+null!=c&&(q.beginPath(),q.rect(0,0,h,l),q.fillStyle=c,q.fill());q.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(f,A/n,A/n);a(g)},0):(q.drawImage(f,A/n,A/n),a(g))}catch(T){null!=k&&k(T)}});f.onerror=function(a){null!=k&&k(a)};try{r&&this.editor.graph.addSvgShadow(d,d);var g=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(v,
+d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(g)}catch(z){null!=k&&k(z)}}),d,y)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=d.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.isCorsEnabledForUrl(c)?"chrome-extension://"!=
c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,f){null==f&&(f=this.createImageUrlConverter());var c=0,g=d||{};d=mxUtils.bind(this,function(d,h){for(var l=a.getElementsByTagName(d),m=0;m<l.length;m++)mxUtils.bind(this,function(d){var l=f.convert(d.getAttribute(h));if(null!=l&&"data:"!=l.substring(0,5)){var m=g[l];null==m?(c++,this.convertImageToDataUri(l,function(f){null!=f&&(g[l]=f,d.setAttribute(h,
-f));c--;0==c&&b(a)})):d.setAttribute(h,m)}else null!=l&&d.setAttribute(h,l)})(l[m])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,f,k,m){try{var c=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var g=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var g=Array(a.length),f=0;f<a.length;f++)g[f]=String.fromCharCode(a[f]);g=g.join("")}m=null!=m?m:"data:image/png;base64,";g=m+this.base64Encode(g)}b(g)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){k&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(w){null!=d&&d(w)}};EditorUi.prototype.isCorsEnabledForUrl=
+f));c--;0==c&&b(a)})):d.setAttribute(h,m)}else null!=l&&d.setAttribute(h,l)})(l[m])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,f,k,m){try{var c=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),g=0;g<a.length;g++)f[g]=String.fromCharCode(a[g]);f=f.join("")}m=null!=m?m:"data:image/png;base64,";f=m+this.base64Encode(f)}b(f)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){k&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(w){null!=d&&d(w)}};EditorUi.prototype.isCorsEnabledForUrl=
function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=
-function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),g=a.getContext("2d");a.height=c.height;a.width=c.width;g.drawImage(c,0,0);try{b(a.toDataURL())}catch(t){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
-function(a,b,d,f,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),l=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var p=l.getElementsByTagName("diagram");if(1==p.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(p[0]))).documentElement;else if(1<p.length){g.model.beginUpdate();try{for(a=0;a<p.length;a++){p[a].removeAttribute("id");var n=this.updatePageRoot(new DiagramPage(p[a])),
-q=this.pages.length;null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,n,n,q))}}finally{g.model.endUpdate()}}}null!=l&&"mxGraphModel"===l.nodeName&&(c=g.importGraphModel(l,b,d,f))}}catch(A){throw k||this.handleError(A,mxResources.get("invalidOrMissingFile")),A;}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f){f=null!=
-f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(f)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a,f);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType="blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{g.response.name=f,this.doImportVisio(g.response,b,d)}catch(x){d(x)}else d({})});
-g.send(c)}else try{this.doImportVisio(a,b,d)}catch(x){d(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(p){d(p)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?
-c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(g){this.handleError(g)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,
-function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{b(LucidImporter.importState(JSON.parse(a)))}catch(p){d(p)}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,
-g=null;c.getModel().beginUpdate();try{g=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(g,!0)}finally{c.getModel().endUpdate()}return g};EditorUi.prototype.insertTextAt=function(a,b,d,f,k,m,n){m=null!=m?m:!0;n=null!=n?n:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,
+function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),f=a.getContext("2d");a.height=c.height;a.width=c.width;f.drawImage(c,0,0);try{b(a.toDataURL())}catch(q){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=
+function(a,b,d,f,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),l=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var n=l.getElementsByTagName("diagram");if(1==n.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){g.model.beginUpdate();try{for(a=0;a<n.length;a++){n[a].removeAttribute("id");var t=this.updatePageRoot(new DiagramPage(n[a])),
+p=this.pages.length;null==t.getName()&&t.setName(mxResources.get("pageWithNumber",[p+1]));g.model.execute(new ChangePage(this,t,t,p))}}finally{g.model.endUpdate()}}}null!=l&&"mxGraphModel"===l.nodeName&&(c=g.importGraphModel(l,b,d,f))}}catch(A){if(k)throw A;this.handleError(A)}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,
+function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(this.isRemoteVisioFormat(f)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a,f);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType="blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{g.response.name=f,this.doImportVisio(g.response,b,d)}catch(x){d(x)}else d({})});g.send(c)}else try{this.doImportVisio(a,
+b,d)}catch(x){d(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(t){d(t)}});this.doImportGraphML||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",
+c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{b(LucidImporter.importState(JSON.parse(a)))}catch(t){d(t)}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,
+f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=center;verticalAlign=middle;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,f,k,m,q){m=null!=m?m:!0;q=null!=q?q:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,
function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var g=this.extractGraphModelFromPng(a),h=this.importXml(g,b,d,m,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(g=null,"data:image/svg+xml;base64,"==a.substring(0,
-26)?(g=a.substring(a.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(a.substring(a.indexOf(",")+1)),h=this.importXml(g,b,d,m,!0),0<h.length)return h}catch(y){}this.loadImage(a,mxUtils.bind(this,function(g){if("data:"==a.substring(0,5))this.resizeImage(g,a,mxUtils.bind(this,function(a,g,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-this.convertDataUri(a)+";"))}),n,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/g.width,this.maxImageSize/g.height)),h=Math.round(g.width*f);g=Math.round(g.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),h,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var g=null;c.getModel().beginUpdate();try{g=c.insertVertex(c.getDefaultParent(),
+26)?(g=a.substring(a.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(a.substring(a.indexOf(",")+1)),h=this.importXml(g,b,d,m,!0),0<h.length)return h}catch(y){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,g){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+this.convertDataUri(a)+";"))}),q,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),h=Math.round(f.width*g);f=Math.round(f.height*g);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),h,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var g=null;c.getModel().beginUpdate();try{g=c.insertVertex(c.getDefaultParent(),
null,a,c.snap(b),c.snap(d),1,1,"text;"+(f?"html=1;":"")),c.updateCellSize(g),c.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{c.getModel().endUpdate()}c.setSelectionCell(g)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,m);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,m))}),mxUtils.bind(this,function(a){this.handleError(a)}));
else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(f?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[k])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),k.value=a,c.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(k.value)&&
c.setLinkForCell(k,k.value),k.geometry.width+=c.gridSize,k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&'{"state":"{\\"Properties\\":'==a.substring(0,26)};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport&&(!mxClient.IS_IE&&!mxClient.IS_IE11||0>navigator.appVersion.indexOf("Windows NT 6.1"))){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&
this.importFiles(c.files,null,null,this.maxImageSize)}));c.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a)}),
-null,c)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var g=this.dialog,f=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(g,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,f,k,m,n,q,r,u,y){u=null!=u?u:!0;var c=!1,g=null,h=mxUtils.bind(this,function(a){var b=
-null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,n)):b=this.importXml(a,d,f,u);null!=q&&q(b)});"image"==b.substring(0,5)?(r=!1,"image/png"==b.substring(0,9)&&(b=y?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,d,f,u),r=!0)),r||(g=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&g.isGridEnabled()&&(d=g.snap(d),f=g.snap(f)),g=[g.insertVertex(null,null,"",d,f,k,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,h)):null!=r&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?(c=!0,this.importVisio(r,h)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,n)?(c=!0,this.parseFile(null!=r?r:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(a.responseText):null!=q&&q(null))}),n)):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||
-(g=this.insertTextAt(this.validateFileData(a),d,f,!0,null,u));c||null==q||q(g);return g};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,k,n;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}k=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);
-b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);b+="=";break}n=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(n&192)>>6);b+=
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,f,k,m,n,q,r,u,y,v){b=null!=b?b:0;d=null!=d?d:0;f=null!=f?f:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,g=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var l=y||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>l){h=!0;break}var t=mxUtils.bind(this,function(){var h=this.editor.graph,l=h.gridSize;
-k=null!=k?k:mxUtils.bind(this,function(a,b,d,f,g,h,l,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,d,f,g,h,l,k,m,c,v)});m=null!=m?m:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,t=p,r=[],w=mxUtils.bind(this,function(a,b){r[a]=b;if(0==--t){this.spinner.stop();if(null!=q)q(r);else{var c=[];h.getModel().beginUpdate();
-try{for(var d=0;d<r.length;d++){var f=r[d]();null!=f&&(c=c.concat(f))}}finally{h.getModel().endUpdate()}}m(c)}}),x=0;x<p;x++)mxUtils.bind(this,function(c){var m=a[c],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==n||n(m))if("image/"==m.type.substring(0,6))if("image/svg"==m.type.substring(0,9)){var p=a.target.result,t=p.indexOf(","),q=decodeURIComponent(escape(atob(p.substring(t+1)))),r=mxUtils.parseXml(q),q=r.getElementsByTagName("svg");if(0<q.length){var q=q[0],z=v?null:q.getAttribute("content");
-null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?w(c,mxUtils.bind(this,function(){try{if(p.substring(0,t+1),null!=r){var a=r.getElementsByTagName("svg");if(0<a.length){var g=a[0],n=parseFloat(g.getAttribute("width")),q=parseFloat(g.getAttribute("height")),v=g.getAttribute("viewBox");if(null==v||0==v.length)g.setAttribute("viewBox",
-"0 0 "+n+" "+q);else if(isNaN(n)||isNaN(q)){var w=v.split(" ");3<w.length&&(n=parseFloat(w[2]),q=parseFloat(w[3]))}p=this.createSvgDataUri(mxUtils.getXml(g));var z=Math.min(1,Math.min(f/Math.max(1,n)),f/Math.max(1,q)),x=k(p,m.type,b+c*l,d+c*l,Math.max(1,Math.round(n*z)),Math.max(1,Math.round(q*z)),m.name);if(isNaN(n)||isNaN(q)){var u=new Image;u.onload=mxUtils.bind(this,function(){n=Math.max(1,u.width);q=Math.max(1,u.height);x[0].geometry.width=n;x[0].geometry.height=q;g.setAttribute("viewBox","0 0 "+
-n+" "+q);p=this.createSvgDataUri(mxUtils.getXml(g));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));h.setCellStyles("image",p,[x[0]])});u.src=this.createSvgDataUri(mxUtils.getXml(g))}return x}}}catch(sa){}return null})):w(c,mxUtils.bind(this,function(){return k(z,"text/xml",b+c*l,d+c*l,0,0,m.name)}))}else w(c,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==m.type){var x=v?null:this.extractGraphModelFromPng(a.target.result);if(null!=x&&0<x.length){var J=
-new Image;J.src=a.target.result;w(c,mxUtils.bind(this,function(){return k(x,"text/xml",b+c*l,d+c*l,J.width,J.height,m.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,
-mxUtils.bind(this,function(h,n,p){w(c,mxUtils.bind(this,function(){if(null!=h&&h.length<u){var t=g&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(f/n,f/p)):1;return k(h,m.type,b+c*l,d+c*l,Math.round(n*t),Math.round(p*t),m.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,f,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,m.type,b+c*l,d+c*l,240,160,m.name,function(a){w(c,
-function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(m.name)||/(\.vs(x|sx?))($|\?)/i.test(m.name)?k(null,m.type,b+c*l,d+c*l,240,160,m.name,function(a){w(c,function(){return a})},m):"image"==m.type.substring(0,5)?p.readAsDataURL(m):p.readAsText(m)})(x)});h?this.confirmImageResize(function(a){g=a;t()},r):t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
+null,c)}else this.editor.graph.setSelectionCells(this.importXml(a))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;g.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importFile=function(a,b,d,f,k,m,q,n,p,r,u){r=null!=r?r:!0;var c=!1,g=null,h=mxUtils.bind(this,function(a){var c=
+null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,q)):c=this.importXml(a,d,f,r);null!=n&&n(c)});"image"==b.substring(0,5)?(p=!1,"image/png"==b.substring(0,9)&&(b=u?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,d,f,r),p=!0)),p||(g=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),r&&g.isGridEnabled()&&(d=g.snap(d),f=g.snap(f)),g=[g.insertVertex(null,null,"",d,f,k,m,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,h)):null!=p&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?(c=!0,this.importVisio(p,h)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,q)?(c=!0,this.parseFile(null!=p?p:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?h(a.responseText):null!=n&&n(null))}),q)):/(\.v(sd|dx))($|\?)/i.test(q)||/(\.vs(s|x))($|\?)/i.test(q)||
+(g=this.insertTextAt(this.validateFileData(a),d,f,!0,null,r));c||null==n||n(g);return g};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,k,q;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}k=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);
+b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);b+="=";break}q=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(q&192)>>6);b+=
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(q&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,f,k,m,q,n,p,r,u,v){b=null!=b?b:0;d=null!=d?d:0;f=null!=f?f:this.maxImageSize;r=null!=r?r:this.maxImageBytes;var c=null!=b&&null!=d,g=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var l=u||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>l){h=!0;break}var w=mxUtils.bind(this,function(){var h=this.editor.graph,l=h.gridSize;
+k=null!=k?k:mxUtils.bind(this,function(a,b,d,f,g,h,l,k,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,d,f,g,h,l,k,m,c,v)});m=null!=m?m:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,p=t,w=[],x=mxUtils.bind(this,function(a,b){w[a]=b;if(0==--p){this.spinner.stop();if(null!=n)n(w);else{var c=[];h.getModel().beginUpdate();
+try{for(var d=0;d<w.length;d++){var f=w[d]();null!=f&&(c=c.concat(f))}}finally{h.getModel().endUpdate()}}m(c)}}),A=0;A<t;A++)mxUtils.bind(this,function(c){var m=a[c],n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==q||q(m))if("image/"==m.type.substring(0,6))if("image/svg"==m.type.substring(0,9)){var n=a.target.result,t=n.indexOf(","),p=decodeURIComponent(escape(atob(n.substring(t+1)))),w=mxUtils.parseXml(p),p=w.getElementsByTagName("svg");if(0<p.length){var p=p[0],z=v?null:p.getAttribute("content");
+null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?x(c,mxUtils.bind(this,function(){try{if(n.substring(0,t+1),null!=w){var a=w.getElementsByTagName("svg");if(0<a.length){var g=a[0],q=parseFloat(g.getAttribute("width")),p=parseFloat(g.getAttribute("height")),v=g.getAttribute("viewBox");if(null==v||0==v.length)g.setAttribute("viewBox",
+"0 0 "+q+" "+p);else if(isNaN(q)||isNaN(p)){var r=v.split(" ");3<r.length&&(q=parseFloat(r[2]),p=parseFloat(r[3]))}n=this.createSvgDataUri(mxUtils.getXml(g));var z=Math.min(1,Math.min(f/Math.max(1,q)),f/Math.max(1,p)),x=k(n,m.type,b+c*l,d+c*l,Math.max(1,Math.round(q*z)),Math.max(1,Math.round(p*z)),m.name);if(isNaN(q)||isNaN(p)){var u=new Image;u.onload=mxUtils.bind(this,function(){q=Math.max(1,u.width);p=Math.max(1,u.height);x[0].geometry.width=q;x[0].geometry.height=p;g.setAttribute("viewBox","0 0 "+
+q+" "+p);n=this.createSvgDataUri(mxUtils.getXml(g));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));h.setCellStyles("image",n,[x[0]])});u.src=this.createSvgDataUri(mxUtils.getXml(g))}return x}}}catch(sa){}return null})):x(c,mxUtils.bind(this,function(){return k(z,"text/xml",b+c*l,d+c*l,0,0,m.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==m.type){var A=v?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var K=
+new Image;K.src=a.target.result;x(c,mxUtils.bind(this,function(){return k(A,"text/xml",b+c*l,d+c*l,K.width,K.height,m.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(h){this.resizeImage(h,a.target.result,
+mxUtils.bind(this,function(h,q,n){x(c,mxUtils.bind(this,function(){if(null!=h&&h.length<r){var p=g&&this.isResampleImage(a.target.result,u)?Math.min(1,Math.min(f/q,f/n)):1;return k(h,m.type,b+c*l,d+c*l,Math.round(q*p),Math.round(n*p),m.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,f,u)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,m.type,b+c*l,d+c*l,240,160,m.name,function(a){x(c,
+function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(m.name)||/(\.vs(x|sx?))($|\?)/i.test(m.name)?k(null,m.type,b+c*l,d+c*l,240,160,m.name,function(a){x(c,function(){return a})},m):"image"==m.type.substring(0,5)?n.readAsDataURL(m):n.readAsText(m)})(A)});h?this.confirmImageResize(function(a){g=a;w()},p):w()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||
mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,f,k,m){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),g=Math.max(1,a.height);
-if(f&&this.isResampleImage(b,m))try{var h=Math.max(c/k,g/k);if(1<h){var l=Math.round(c/h),n=Math.round(g/h),p=document.createElement("canvas");p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var q=p.toDataURL();if(q.length<b.length){var r=document.createElement("canvas");r.width=l;r.height=n;var u=r.toDataURL();q!==u&&(b=q,c=l,g=n)}}}catch(E){}d(b,c,g)};EditorUi.prototype.crcTable=[];for(var f=0;256>f;f++)for(var d=f,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[f]=
+if(f&&this.isResampleImage(b,m))try{var h=Math.max(c/k,g/k);if(1<h){var l=Math.round(c/h),n=Math.round(g/h),p=document.createElement("canvas");p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var t=p.toDataURL();if(t.length<b.length){var r=document.createElement("canvas");r.width=l;r.height=n;var u=r.toDataURL();t!==u&&(b=t,c=l,g=n)}}}catch(F){}d(b,c,g)};EditorUi.prototype.crcTable=[];for(var f=0;256>f;f++)for(var d=f,k=0;8>k;k++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[f]=
d;EditorUi.prototype.updateCRC=function(a,b,d,f){for(var c=0;c<f;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,f,k){function c(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<
16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(c(a,4),"IHDR"!=c(a,4))null!=k&&k();else{c(a,17);k=a.substring(0,l);do{var n=g(a);if("IDAT"==c(a,4)){k=a.substring(0,l-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+f;f=4294967295;f=this.updateCRC(f,
b,0,4);f=this.updateCRC(f,d,0,d.length);k+=h(d.length)+b+d+h(f^4294967295);k+=a.substring(l-8,a.length);break}k+=a.substring(l-8,l-4+n);c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),
-"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(p){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=
+"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(t){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=
d);c.src=a};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(z){a.handleError(z)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var f=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return f.apply(this,arguments)};
var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};k.call(this,a,c,d)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:m.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))t.apply(this,
-arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var q=this.actions.get("print");q.setEnabled(!mxClient.IS_IOS||!navigator.standalone);q.visible=q.isEnabled();if(!this.editor.chromeless||this.editor.editable){var r=function(){window.setTimeout(function(){u.innerHTML="&nbsp;";
+360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:m.apply(this,arguments)};var q=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))q.apply(this,
+arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var r=function(){window.setTimeout(function(){u.innerHTML="&nbsp;";
u.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var g=c.items;for(index in g){var h=g[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,g,h){b.insertImage(a,g,h)},function(){},function(a){return"image/"==a.type.substring(0,
-6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var l=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],l.x,l.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(U){}}),!1);var u=document.createElement("div");u.style.position="absolute";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.display="block";u.contentEditable=!0;mxUtils.setOpacity(u,0);u.style.width="1px";u.style.height="1px";u.innerHTML="&nbsp;";var y=!1;this.keyHandler.bindControlKey(88,null);
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(V){}}),!1);var u=document.createElement("div");u.style.position="absolute";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.display="block";u.contentEditable=!0;mxUtils.setOpacity(u,0);u.style.width="1px";u.style.height="1px";u.innerHTML="&nbsp;";var y=!1;this.keyHandler.bindControlKey(88,null);
this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||y||(u.style.left=b.container.scrollLeft+10+"px",u.style.top=b.container.scrollTop+10+"px",b.container.appendChild(u),
y=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){u.focus();document.execCommand("selectAll",!1,null)},0):(u.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!y||224!=c&&17!=c&&91!=c||(y=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),u.parentNode.removeChild(u),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(u,
"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(u),r())}));mxEvent.addListener(u,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(u,!0),r())}));mxEvent.addListener(u,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u.innerHTML="&nbsp;",u.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,u);u.innerHTML="&nbsp;"}),0))}),!0);var v=this.isSelectionAllowed;this.isSelectionAllowed=
function(a){return mxEvent.getSource(a)==u?!0:v.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),
mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,g,h){b.insertImage(a,g,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
-mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){q=document.createElement("div");q.style.position="absolute";q.style.top="95px";q.style.left="250px";q.style.width="2000px";q.style.height="30px";q.style.background=
-"whiteSmoke";document.body.appendChild(q);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var F=document.createElement("div");F.style.position="absolute";F.style.top="95px";F.style.left="220px";F.style.width="30px";F.style.height="30px";F.style.background="whiteSmoke";document.body.appendChild(F);this.vRuler=new mxRuler(this.editor.graph,
-A,!0);this.hRuler=new mxRuler(this.editor.graph,q,!1)}if("1"==urlParams.styledev){q=document.getElementById("geFooter");null!=q&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,
-function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),q.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var P=this.isSelectionAllowed;
-this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:P.apply(this,arguments)}}q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
-E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,g=c.x/f-d.x,h=c.y/f-d.y;mxEvent.isAltDown(a)&&(h=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
-g,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,g,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var m=null,d=c.getElementsByTagName("img");
-null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(k=c[0].getAttribute("href")));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,g,h,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,
-function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",g,h,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,g,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
+mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){p=document.createElement("div");p.style.position="absolute";p.style.top="95px";p.style.left="250px";p.style.width="2000px";p.style.height="30px";p.style.background=
+"whiteSmoke";document.body.appendChild(p);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var G=document.createElement("div");G.style.position="absolute";G.style.top="95px";G.style.left="220px";G.style.width="30px";G.style.height="30px";G.style.background="whiteSmoke";document.body.appendChild(G);this.vRuler=new mxRuler(this.editor.graph,
+A,!0);this.hRuler=new mxRuler(this.editor.graph,p,!1)}if("1"==urlParams.styledev){p=document.getElementById("geFooter");null!=p&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,
+function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var Q=this.isSelectionAllowed;
+this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:Q.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var F=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=F&&(F.parentNode.removeChild(F),F=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
+F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=F&&(F.parentNode.removeChild(F),F=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,g=c.x/f-d.x,h=c.y/f-d.y;mxEvent.isAltDown(a)&&(h=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+g,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,g,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var m=null,d=c.getElementsByTagName("img");
+null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(l=c[0].getAttribute("href")));var q=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,g,h,!0,m,null,q))});m&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){q=a;n()},mxEvent.isControlDown(a)):n()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,
+function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",g,h,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,g,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
g,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();this.editUpdateListener=mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");null!=c&&this.updateEditReferences(c)});this.editor.undoManager.addListener(mxEvent.BEFORE_UNDO,this.editUpdateListener);this.editor.undoManager.addListener(mxEvent.BEFORE_REDO,this.editUpdateListener);"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,
arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};
EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
@@ -3103,8 +3123,8 @@ k.style.top=b+"px";k.style.left=c+"px";k.style.width=Math.max(0,d-3)+"px";k.styl
c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)&&(f=f.substring(0,f.length-4)+".xml");var g=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".xml":f+".xml";if("<mxlibrary"==
a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();g(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();
g(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?g(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".xml"),this.convertLucidChart(d,
-mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,
-9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}}catch(D){this.handleError(D)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&
+mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,f,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,
+9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,f,b)}}catch(E){this.handleError(E)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&
this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=
new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,
a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));
@@ -3114,21 +3134,21 @@ this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop()
window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,k=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var h=g.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
-(a=this.editor.graph.decompress(a)))}catch(N){}return a});if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(J){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();k=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?
+(a=this.editor.graph.decompress(a)))}catch(O){}return a});if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(K){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();k=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?
mxResources.get(h.okKey):null,function(a){null!=a&&n.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==h.action){var l=k(h.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),
-mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(J){n.postMessage(JSON.stringify({event:"draft",
-error:J.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();k=1==h.enableRecent;l=1==h.enableSearch;k=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,k?mxUtils.bind(this,function(a){this.recentReadyCallback=
+mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(K){n.postMessage(JSON.stringify({event:"draft",
+error:K.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();k=1==h.enableRecent;l=1==h.enableSearch;k=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,k?mxUtils.bind(this,function(a){this.recentReadyCallback=
a;n.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;n.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){n.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("searchDocsList"==h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==
-h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("textContent"==h.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,k="";if(null!=this.pages)for(l=0;l<this.pages.length;l++){var t=m;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(m.getStylesheet()),t.model.setRoot(this.pages[l].root));k+=this.pages[l].getName()+" "+t.getIndexableText()+" "}else k=m.getIndexableText();this.editor.graph.setEnabled(!0);n.postMessage(JSON.stringify({event:"textContent",data:k,
-message:h}),"*");return}if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var q=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,q):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==
-h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var p=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(p);n.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
-"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);r(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),x=m.getGlobalVariable,z=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(m.container);
-m.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
-h.xml&&0<h.xml.length&&this.setFileData(h.xml);q=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),q.xml=mxUtils.getXml(k),q.data=this.getFileData(null,null,!0,null,null,null,k),q.format=h.format;else if("html"==h.format)p=this.editor.getGraphXml(),q.data=this.getHtml(p,this.editor.graph),q.xml=mxUtils.getXml(p),q.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;
-k==mxConstants.NONE&&(k=null);q.xml=this.getFileData(!0);q.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(q.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(a);n.postMessage(JSON.stringify(q),"*")})):this.convertImages(this.editor.graph.getSvg(k),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();q.data=this.createSvgDataUri(mxUtils.getXml(a));n.postMessage(JSON.stringify(q),"*")}));return}k="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));q.data=this.createSvgDataUri(k)}n.postMessage(JSON.stringify(q),"*")}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=
+h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("textContent"==h.action){this.editor.graph.setEnabled(!1);var m=this.editor.graph,k="";if(null!=this.pages)for(l=0;l<this.pages.length;l++){var q=m;this.currentPage!=this.pages[l]&&(q=this.createTemporaryGraph(m.getStylesheet()),q.model.setRoot(this.pages[l].root));k+=this.pages[l].getName()+" "+q.getIndexableText()+" "}else k=m.getIndexableText();this.editor.graph.setEnabled(!0);n.postMessage(JSON.stringify({event:"textContent",data:k,
+message:h}),"*");return}if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var p=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==
+h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var r=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(r);n.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);
+"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(r))));m!=this.editor.graph&&m.container.parentNode.removeChild(m.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),x=m.getGlobalVariable,z=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:x.apply(this,arguments)};document.body.appendChild(m.container);
+m.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(r)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=
+h.xml&&0<h.xml.length&&this.setFileData(h.xml);p=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),p.xml=mxUtils.getXml(k),p.data=this.getFileData(null,null,!0,null,null,null,k),p.format=h.format;else if("html"==h.format)r=this.editor.getGraphXml(),p.data=this.getHtml(r,this.editor.graph),p.xml=mxUtils.getXml(r),p.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;
+k==mxConstants.NONE&&(k=null);p.xml=this.getFileData(!0);p.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);n.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(k),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));n.postMessage(JSON.stringify(p),"*")}));return}k="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));p.data=this.createSvgDataUri(k)}n.postMessage(JSON.stringify(p),"*")}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=
h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):h.xml;else{n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}var B=mxUtils.bind(this,function(g,h){c=!0;try{a(g,h)}catch(V){this.handleError(V)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});
+this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):h.xml;else{n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}var B=mxUtils.bind(this,function(g,h){c=!0;try{a(g,h)}catch(W){this.handleError(W)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});
f=k();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=k();if(d!=f&&!c){var g=this.createLoadMessage("autosave");g.xml=d;d=JSON.stringify(g);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",
b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||n.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=h&&"function"===typeof h.substring&&"data:application/vnd.visio;base64,"==h.substring(0,34)?(k="0M8R4KGxGuE"==h.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(h.substring(h.indexOf(",")+
1)),function(a){B(a,g)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=h&&"function"===typeof h.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(h,"")?this.parseFile(new Blob([h],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&B(a.responseText,g)}),""):null!=h&&"function"===typeof h.substring&&this.isLucidChartData(h)?this.convertLucidChart(h,
@@ -3136,19 +3156,19 @@ mxUtils.bind(this,function(a){B(a)}),mxUtils.bind(this,function(a){this.handleEr
"2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,
-640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var f={},g=null,k=null,n=null,q=null,r="",u="auto",v="auto",A=null,F=null,P=40,E=40,H=100,L=0,z=this.editor.graph;z.getGraphBounds();for(var B=function(){null!=b?b(ea):(z.setSelectionCells(ea),z.scrollCellToVisible(z.getSelectionCell()))},J=z.getFreeInsertPoint(),N=J.x,R=J.y,J=R,V=null,U="auto",q=null,I=[],ha=null,na=null,X=0;X<c.length&&"#"==c[X].charAt(0);){a=c[X];for(X++;X<
-c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[X].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[X].substring(1)),X++;if("#"!=a.charAt(1)){var aa=a.indexOf(":");if(0<aa){var M=mxUtils.trim(a.substring(1,aa)),G=mxUtils.trim(a.substring(aa+1));"label"==M?V=z.sanitizeHtml(G):"style"==M?g=G:"parentstyle"==M?k=G:"identity"==M&&0<G.length&&"-"!=G?n=G:"parent"==M&&0<G.length&&"-"!=G?q=G:"namespace"==M&&0<G.length&&"-"!=G?r=G:"width"==M?u=G:"height"==M?v=G:"left"==M&&0<G.length?A=G:"top"==M&&0<G.length?
-F=G:"ignore"==M?na=G.split(","):"connect"==M?I.push(JSON.parse(G)):"link"==M?ha=G:"padding"==M?L=parseFloat(G):"edgespacing"==M?P=parseFloat(G):"nodespacing"==M?E=parseFloat(G):"levelspacing"==M?H=parseFloat(G):"layout"==M&&(U=G)}}}var T=this.editor.csvToArray(c[X]),M=aa=null;if(null!=n||null!=q)for(var K=0;K<T.length;K++)n==T[K]&&(aa=K),q==T[K]&&(M=K);null==V&&(V="%"+T[0]+"%");if(null!=I)for(var O=0;O<I.length;O++)null==f[I[O].to]&&(f[I[O].to]={});z.model.beginUpdate();try{for(K=X+1;K<c.length;K++){var S=
-this.editor.csvToArray(c[K]);if(null==S){var ja=40<c[K].length?c[K].substring(0,40)+"...":c[K];throw Error(K+" ("+ja+") "+mxResources.get("containsValidationErrors"));}if(S.length==T.length){var C=null,da=null!=aa?r+S[aa]:null;null!=da&&(C=z.model.getCell(da));null==C&&(C=new mxCell(V,new mxGeometry(N,J,0,0),g||"whiteSpace=wrap;html=1;"),C.vertex=!0,C.id=da);for(var W=0;W<S.length;W++)z.setAttributeForCell(C,T[W],S[W]);z.setAttributeForCell(C,"placeholders","1");C.style=z.replacePlaceholders(C,C.style);
-for(O=0;O<I.length;O++)f[I[O].to][C.getAttribute(I[O].to)]=C;null!=ha&&"link"!=ha&&(z.setLinkForCell(C,C.getAttribute(ha)),z.setAttributeForCell(C,ha,null));z.fireEvent(new mxEventObject("cellsInserted","cells",[C]));var Y=this.editor.graph.getPreferredSizeForCell(C);C.vertex&&(null!=A&&null!=C.getAttribute(A)&&(C.geometry.x=N+parseFloat(C.getAttribute(A))),null!=F&&null!=C.getAttribute(F)&&(C.geometry.y=R+parseFloat(C.getAttribute(F))),"@"==u.charAt(0)&&null!=C.getAttribute(u.substring(1))?C.geometry.width=
-parseFloat(C.getAttribute(u.substring(1))):C.geometry.width="auto"==u?Y.width+L:parseFloat(u),"@"==v.charAt(0)&&null!=C.getAttribute(v.substring(1))?C.geometry.height=parseFloat(C.getAttribute(v.substring(1))):C.geometry.height="auto"==v?Y.height+L:parseFloat(v),J+=C.geometry.height+E);q=null!=M?z.model.getCell(r+S[M]):null;null!=q?(q.style=z.replacePlaceholders(q,k),z.addCell(C,q)):d.push(z.addCell(C))}}for(var ba=d.slice(),ea=d.slice(),O=0;O<I.length;O++)for(var Z=I[O],K=0;K<d.length;K++){var C=
-d[K],qa=C.getAttribute(Z.from);if(null!=qa){z.setAttributeForCell(C,Z.from,null);for(var sa=qa.split(","),W=0;W<sa.length;W++){var la=f[Z.to][sa[W]];null!=la&&(V=Z.label,null!=Z.fromlabel&&(V=(C.getAttribute(Z.fromlabel)||"")+(V||"")),null!=Z.tolabel&&(V=(V||"")+(la.getAttribute(Z.tolabel)||"")),ea.push(z.insertEdge(null,null,V||"",Z.invert?la:C,Z.invert?C:la,Z.style||z.createCurrentEdgeStyle())),mxUtils.remove(Z.invert?C:la,ba))}}}if(null!=na)for(K=0;K<d.length;K++)for(C=d[K],W=0;W<na.length;W++)z.setAttributeForCell(C,
-mxUtils.trim(na[W]),null);var oa=new mxParallelEdgeLayout(z);oa.spacing=P;var va=function(){oa.execute(z.getDefaultParent());for(var a=0;a<d.length;a++){var b=z.getCellGeometry(d[a]);b.x=Math.round(z.snap(b.x));b.y=Math.round(z.snap(b.y));"auto"==u&&(b.width=Math.round(z.snap(b.width)));"auto"==v&&(b.height=Math.round(z.snap(b.height)))}};if("circle"==U){var ka=new mxCircleLayout(z);ka.resetEdges=!1;var ta=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return ta.apply(this,arguments)||0>mxUtils.indexOf(d,
-a)};this.executeLayout(function(){ka.execute(z.getDefaultParent());va()},!0,B);B=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&ea.length==2*d.length-1&&1==ba.length){z.view.validate();var ia=new mxCompactTreeLayout(z,"horizontaltree"==U);ia.levelDistance=E;ia.edgeRouting=!1;ia.resetEdges=!1;this.executeLayout(function(){ia.execute(z.getDefaultParent(),0<ba.length?ba[0]:null)},!0,B);B=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==ba.length){z.view.validate();
-var fa=new mxHierarchicalLayout(z,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fa.intraCellSpacing=E;fa.parallelEdgeSpacing=P;fa.interRankCellSpacing=H;fa.disableEdgeStyle=!1;this.executeLayout(function(){fa.execute(z.getDefaultParent(),ea);z.moveCells(ea,N,R)},!0,B);B=null}else if("organic"==U||"auto"==U&&ea.length>d.length){z.view.validate();var ca=new mxFastOrganicLayout(z);ca.forceConstant=3*E;ca.resetEdges=!1;var ya=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return ya.apply(this,
-arguments)||0>mxUtils.indexOf(d,a)};oa=new mxParallelEdgeLayout(z);oa.spacing=P;this.executeLayout(function(){ca.execute(z.getDefaultParent());va()},!0,B);B=null}this.hideDialog()}finally{z.model.endUpdate()}null!=B&&B()}}catch(wa){this.handleError(wa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=
+640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var f={},g=null,k=null,n=null,p=null,r="",u="auto",v="auto",A=null,G=null,Q=40,F=40,I=100,M=0,z=this.editor.graph;z.getGraphBounds();for(var B=function(){null!=b?b(fa):(z.setSelectionCells(fa),z.scrollCellToVisible(z.getSelectionCell()))},K=z.getFreeInsertPoint(),O=K.x,T=K.y,K=T,W=null,V="auto",p=null,J=[],ha=null,na=null,Y=0;Y<c.length&&"#"==c[Y].charAt(0);){a=c[Y];for(Y++;Y<
+c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Y].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Y].substring(1)),Y++;if("#"!=a.charAt(1)){var ba=a.indexOf(":");if(0<ba){var N=mxUtils.trim(a.substring(1,ba)),H=mxUtils.trim(a.substring(ba+1));"label"==N?W=z.sanitizeHtml(H):"style"==N?g=H:"parentstyle"==N?k=H:"identity"==N&&0<H.length&&"-"!=H?n=H:"parent"==N&&0<H.length&&"-"!=H?p=H:"namespace"==N&&0<H.length&&"-"!=H?r=H:"width"==N?u=H:"height"==N?v=H:"left"==N&&0<H.length?A=H:"top"==N&&0<H.length?
+G=H:"ignore"==N?na=H.split(","):"connect"==N?J.push(JSON.parse(H)):"link"==N?ha=H:"padding"==N?M=parseFloat(H):"edgespacing"==N?Q=parseFloat(H):"nodespacing"==N?F=parseFloat(H):"levelspacing"==N?I=parseFloat(H):"layout"==N&&(V=H)}}}var U=this.editor.csvToArray(c[Y]),N=ba=null;if(null!=n||null!=p)for(var L=0;L<U.length;L++)n==U[L]&&(ba=L),p==U[L]&&(N=L);null==W&&(W="%"+U[0]+"%");if(null!=J)for(var P=0;P<J.length;P++)null==f[J[P].to]&&(f[J[P].to]={});z.model.beginUpdate();try{for(L=Y+1;L<c.length;L++){var R=
+this.editor.csvToArray(c[L]);if(null==R){var ja=40<c[L].length?c[L].substring(0,40)+"...":c[L];throw Error(L+" ("+ja+") "+mxResources.get("containsValidationErrors"));}if(R.length==U.length){var D=null,ea=null!=ba?r+R[ba]:null;null!=ea&&(D=z.model.getCell(ea));null==D&&(D=new mxCell(W,new mxGeometry(O,K,0,0),g||"whiteSpace=wrap;html=1;"),D.vertex=!0,D.id=ea);for(var X=0;X<R.length;X++)z.setAttributeForCell(D,U[X],R[X]);z.setAttributeForCell(D,"placeholders","1");D.style=z.replacePlaceholders(D,D.style);
+for(P=0;P<J.length;P++)f[J[P].to][D.getAttribute(J[P].to)]=D;null!=ha&&"link"!=ha&&(z.setLinkForCell(D,D.getAttribute(ha)),z.setAttributeForCell(D,ha,null));z.fireEvent(new mxEventObject("cellsInserted","cells",[D]));var Z=this.editor.graph.getPreferredSizeForCell(D);D.vertex&&(null!=A&&null!=D.getAttribute(A)&&(D.geometry.x=O+parseFloat(D.getAttribute(A))),null!=G&&null!=D.getAttribute(G)&&(D.geometry.y=T+parseFloat(D.getAttribute(G))),"@"==u.charAt(0)&&null!=D.getAttribute(u.substring(1))?D.geometry.width=
+parseFloat(D.getAttribute(u.substring(1))):D.geometry.width="auto"==u?Z.width+M:parseFloat(u),"@"==v.charAt(0)&&null!=D.getAttribute(v.substring(1))?D.geometry.height=parseFloat(D.getAttribute(v.substring(1))):D.geometry.height="auto"==v?Z.height+M:parseFloat(v),K+=D.geometry.height+F);p=null!=N?z.model.getCell(r+R[N]):null;null!=p?(p.style=z.replacePlaceholders(p,k),z.addCell(D,p)):d.push(z.addCell(D))}}for(var ca=d.slice(),fa=d.slice(),P=0;P<J.length;P++)for(var aa=J[P],L=0;L<d.length;L++){var D=
+d[L],qa=D.getAttribute(aa.from);if(null!=qa){z.setAttributeForCell(D,aa.from,null);for(var sa=qa.split(","),X=0;X<sa.length;X++){var la=f[aa.to][sa[X]];null!=la&&(W=aa.label,null!=aa.fromlabel&&(W=(D.getAttribute(aa.fromlabel)||"")+(W||"")),null!=aa.tolabel&&(W=(W||"")+(la.getAttribute(aa.tolabel)||"")),fa.push(z.insertEdge(null,null,W||"",aa.invert?la:D,aa.invert?D:la,aa.style||z.createCurrentEdgeStyle())),mxUtils.remove(aa.invert?D:la,ca))}}}if(null!=na)for(L=0;L<d.length;L++)for(D=d[L],X=0;X<na.length;X++)z.setAttributeForCell(D,
+mxUtils.trim(na[X]),null);var oa=new mxParallelEdgeLayout(z);oa.spacing=Q;var va=function(){oa.execute(z.getDefaultParent());for(var a=0;a<d.length;a++){var b=z.getCellGeometry(d[a]);b.x=Math.round(z.snap(b.x));b.y=Math.round(z.snap(b.y));"auto"==u&&(b.width=Math.round(z.snap(b.width)));"auto"==v&&(b.height=Math.round(z.snap(b.height)))}};if("circle"==V){var ka=new mxCircleLayout(z);ka.resetEdges=!1;var ta=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return ta.apply(this,arguments)||0>mxUtils.indexOf(d,
+a)};this.executeLayout(function(){ka.execute(z.getDefaultParent());va()},!0,B);B=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&fa.length==2*d.length-1&&1==ca.length){z.view.validate();var ia=new mxCompactTreeLayout(z,"horizontaltree"==V);ia.levelDistance=F;ia.edgeRouting=!1;ia.resetEdges=!1;this.executeLayout(function(){ia.execute(z.getDefaultParent(),0<ca.length?ca[0]:null)},!0,B);B=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==ca.length){z.view.validate();
+var ga=new mxHierarchicalLayout(z,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=F;ga.parallelEdgeSpacing=Q;ga.interRankCellSpacing=I;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(z.getDefaultParent(),fa);z.moveCells(fa,O,T)},!0,B);B=null}else if("organic"==V||"auto"==V&&fa.length>d.length){z.view.validate();var da=new mxFastOrganicLayout(z);da.forceConstant=3*F;da.resetEdges=!1;var ya=da.isVertexIgnored;da.isVertexIgnored=function(a){return ya.apply(this,
+arguments)||0>mxUtils.indexOf(d,a)};oa=new mxParallelEdgeLayout(z);oa.spacing=Q;this.executeLayout(function(){da.execute(z.getDefaultParent());va()},!0,B);B=null}this.hideDialog()}finally{z.model.endUpdate()}null!=B&&B()}}catch(wa){this.handleError(wa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=
window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,
-!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var q=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=q.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-
+!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-
2*a.y/b))}return d.apply(this,arguments)};var f=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return f.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=
this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var k=b.init;b.init=function(){k.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+
a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),f=b.source,g=b.outline;g.pageScale=f.pageScale;g.pageFormat=f.pageFormat;g.background=f.background;g.pageVisible=f.pageVisible;g.background=f.background;var h=mxUtils.getCurrentStyle(f.container);g.container.style.backgroundColor=h.backgroundColor;null!=f.view.backgroundPageShape&&
@@ -3164,8 +3184,8 @@ EditorUi.prototype.updateActionStates=function(){r.apply(this,arguments);var a=t
this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));
this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);
this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);u.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,f,k,m){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(f,k,m)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),n=Math.floor(h.width*k/c.view.scale),
-l=Math.floor(h.height*k/c.view.scale);g.length<=MAX_REQUEST_SIZE&&n*l<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=f?f:"none")+"&w="+n+"&h="+l+"&border="+m+"&xml="+encodeURIComponent(g))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
+this.exportDialog=null);u.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,f,k,m){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(f,k,m)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),l=Math.floor(h.width*k/c.view.scale),
+n=Math.floor(h.height*k/c.view.scale);g.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=f?f:"none")+"&w="+l+"&h="+n+"&border="+m+"&xml="+encodeURIComponent(g))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var f=this.getFutureCellForEdit(c.model,a,d.source.id);f!=d.source&&(d.source=f)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,d){var c=a.getCell(d);if(null==c)for(var f=b.changes.length-1;0<=f;f--){var g=b.changes[f];if(g.constructor==mxChildChange&&null!=g.child&&g.child.id==d){a.contains(g.previous)&&
(c=g.child);break}}return c}})();function DiagramPage(a){this.node=a;null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
function RenamePage(a,b,f){this.ui=a;this.page=b;this.previous=this.name=f}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,b,f){this.ui=a;this.oldIndex=b;this.newIndex=f}
@@ -3180,8 +3200,8 @@ null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.page
a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),f=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&
this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var f=b.getProperty("edit").changes,k=0;k<f.length;k++)if(f[k]instanceof SelectPage||f[k]instanceof RenamePage||f[k]instanceof MovePage||f[k]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
EditorUi.prototype.restoreViewState=function(a,b,f){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(d.setViewState(b),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+b.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+b.scrollTop,d.restoreSelection(f))};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),n=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),
-shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(d)||isNaN(k)?mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),f=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),n=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),
+shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(d)||isNaN(k)?mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),
selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
Graph.prototype.saveViewState=function(a,b,f){f||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);f=null!=a?a.pageFormat:mxSettings.getPageFormat();null!=f&&(b.setAttribute("pageWidth",f.width),b.setAttribute("pageHeight",f.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",
@@ -3203,9 +3223,9 @@ EditorUi.prototype.createTabContainer=function(){var a=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var f=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
f)/this.pages.length)+1),k=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,
"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(n,this.createTabForPage(this.pages[n],d,this.pages[n]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
-d=this.createPageMenuTab();this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-f){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var q=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");q.style.position="absolute";q.style.right=this.editor.chromeless?"29px":"55px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var r=this.createControlTab(4,
-"&nbsp;&#10095;");r.style.position="absolute";r.style.right=this.editor.chromeless?"0px":"29px";r.style.fontSize="13pt";this.tabContainer.appendChild(r);var u=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=u+"px";mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,u-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(q,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(r,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+d=this.createPageMenuTab();this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-f){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var r=this.createControlTab(4,
+"&nbsp;&#10095;");r.style.position="absolute";r.style.right=this.editor.chromeless?"0px":"29px";r.style.fontSize="13pt";this.tabContainer.appendChild(r);var u=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=u+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(r,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,u-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(r,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;
b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var f=this.createTab(!0);f.style.paddingTop=a+"px";f.style.cursor="pointer";f.style.width="30px";f.style.lineHeight="30px";f.innerHTML=b;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};
@@ -3215,7 +3235,7 @@ null,mxUtils.bind(this,function(){this.renamePage(f,f.getName())}),b),a.addSepar
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,b,f){f=this.createTab(f);var d=a.getName()||mxResources.get("untitled"),k=a.getId();f.setAttribute("title",d+(null!=k?" ("+k+")":""));mxUtils.write(f,d);f.style.maxWidth=b+"px";f.style.width=b+"px";this.addTabListeners(a,f);42<b&&(f.style.textOverflow="ellipsis");return f};
EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var f=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;f.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(n){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(n)&&k||mxEvent.isPopupTrigger(n))){f.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!d){var q=new mxPopupMenu(this.createPageMenu(a));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);this.resetCurrentMenu();q.destroy()});var r=mxEvent.getClientX(n),u=mxEvent.getClientY(n);q.popup(r,u,null,n);this.setCurrentMenu(q,b)}mxEvent.consume(n)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var r=mxEvent.getClientX(n),u=mxEvent.getClientY(n);p.popup(r,u,null,n);this.setCurrentMenu(p,b)}mxEvent.consume(n)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(f,d){f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);f.addSeparator(d);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,f,d){d.ui=a.ui;return f};a.afterDecode=function(a,f,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
@@ -3223,38 +3243,38 @@ mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=EditorUi.prot
a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var f=d.getAttribute("id");null==a.lookup(f)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,f,r,u){d=null!=d?d:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=f.slice(),g=[],h=0;h<f.length;h++){var k=this.view.getState(f[h]),n=null!=k?k.style:this.getCellStyle(f[h]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(f[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=f[h]&&g.push(a);return a==f[h]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(f[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);f=c;f=b.apply(this,arguments)}finally{this.model.endUpdate()}return f};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return t.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=t.getParent(a),b=m.view.getState(a),m.view.getState(a),b="tree"==(null!=
-b?b.style:m.getCellStyle(a)).containerType);return b}function f(a){var b=!1;null!=a&&(a=t.getParent(a),b=m.view.getState(a),m.view.getState(a),b=null!=(null!=b?b.style:m.getCellStyle(a)).childLayout);return b}function r(a){a=m.view.getState(a);if(null!=a){var b=m.getIncomingEdges(a.cell);if(0<b.length&&(b=m.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
+this.model.setCollapsed(f[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);f=c;f=b.apply(this,arguments)}finally{this.model.endUpdate()}return f};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return q.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=q.getParent(a),b=m.view.getState(a),m.view.getState(a),b="tree"==(null!=
+b?b.style:m.getCellStyle(a)).containerType);return b}function f(a){var b=!1;null!=a&&(a=q.getParent(a),b=m.view.getState(a),m.view.getState(a),b=null!=(null!=b?b.style:m.getCellStyle(a)).childLayout);return b}function r(a){a=m.view.getState(a);if(null!=a){var b=m.getIncomingEdges(a.cell);if(0<b.length&&(b=m.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function u(a,b){b=null!=b?b:!0;m.model.beginUpdate();try{var c=m.model.getParent(a),d=m.getIncomingEdges(a),f=m.cloneCells([d[0],a]);m.model.setTerminal(f[0],m.model.getTerminal(d[0],!0),!0);var g=r(a),h=c.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-
-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;m.view.currentRoot!=c&&(f[1].geometry.x-=h.x,f[1].geometry.y-=h.y);var k=m.view.getState(a),l=m.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*l;var q=m.getOutgoingEdges(m.model.getTerminal(d[0],!0));if(null!=q){for(var t=g==mxConstants.DIRECTION_SOUTH||
-g==mxConstants.DIRECTION_NORTH,p=h=d=0;p<q.length;p++){var v=m.model.getTerminal(q[p],!1);if(g==r(v)){var u=m.view.getState(v);v!=a&&null!=u&&(t&&b!=u.getCenterX()<k.getCenterX()||!t&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/l),h=10+Math.max(h,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/l))}}t?h=0:d=0;for(p=0;p<q.length;p++)if(v=m.model.getTerminal(q[p],!1),g==r(v)&&(u=m.view.getState(v),v!=a&&null!=
-u&&(t&&b!=u.getCenterX()<k.getCenterX()||!t&&b!=u.getCenterY()<k.getCenterY()))){var z=[];m.traverse(u.cell,!0,function(a,b){null!=b&&z.push(b);z.push(a);return!0});m.moveCells(z,(b?1:-1)*d,(b?1:-1)*h)}}}return m.addCells(f,c)}finally{m.model.endUpdate()}}function c(a){m.model.beginUpdate();try{var b=r(a),c=m.getIncomingEdges(a),d=m.cloneCells([c[0],a]);m.model.setTerminal(c[0],d[1],!1);m.model.setTerminal(d[0],d[1],!0);m.model.setTerminal(d[0],a,!1);var f=m.model.getParent(a),g=f.geometry,h=[];m.view.currentRoot!=
+10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;m.view.currentRoot!=c&&(f[1].geometry.x-=h.x,f[1].geometry.y-=h.y);var k=m.view.getState(a),l=m.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*l;var q=m.getOutgoingEdges(m.model.getTerminal(d[0],!0));if(null!=q){for(var p=g==mxConstants.DIRECTION_SOUTH||
+g==mxConstants.DIRECTION_NORTH,v=h=d=0;v<q.length;v++){var t=m.model.getTerminal(q[v],!1);if(g==r(t)){var u=m.view.getState(t);t!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/l),h=10+Math.max(h,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/l))}}p?h=0:d=0;for(v=0;v<q.length;v++)if(t=m.model.getTerminal(q[v],!1),g==r(t)&&(u=m.view.getState(t),t!=a&&null!=
+u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY()))){var w=[];m.traverse(u.cell,!0,function(a,b){null!=b&&w.push(b);w.push(a);return!0});m.moveCells(w,(b?1:-1)*d,(b?1:-1)*h)}}}return m.addCells(f,c)}finally{m.model.endUpdate()}}function c(a){m.model.beginUpdate();try{var b=r(a),c=m.getIncomingEdges(a),d=m.cloneCells([c[0],a]);m.model.setTerminal(c[0],d[1],!1);m.model.setTerminal(d[0],d[1],!0);m.model.setTerminal(d[0],a,!1);var f=m.model.getParent(a),g=f.geometry,h=[];m.view.currentRoot!=
f&&(d[1].geometry.x-=g.x,d[1].geometry.y-=g.y);m.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-40):b==mxConstants.DIRECTION_WEST?(k=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);m.moveCells(h,k,l);return m.addCells(d,f)}finally{m.model.endUpdate()}}function g(a){m.model.beginUpdate();try{var b=m.model.getParent(a),c=m.getIncomingEdges(a),d=m.cloneCells([c[0],
-a]);m.model.setTerminal(d[0],a,!0);var c=m.getOutgoingEdges(a),f=b.geometry,g=[];m.view.currentRoot==b&&(f=new mxRectangle);for(var h=0;h<c.length;h++){var k=m.model.getTerminal(c[h],!1);null!=k&&g.push(k)}var l=m.view.getBounds(g),n=r(a),q=m.view.translate,t=m.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-q.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
-null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-q.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-f.x+40):d[1].geometry.x+(a.geometry.width-f.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/t-q.y+-f.y+10);return m.addCells(d,b)}finally{m.model.endUpdate()}}function h(a,b,c){a=m.getOutgoingEdges(a);c=m.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var f=0;f<a.length;f++){var g=m.view.getState(m.model.getTerminal(a[f],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,b){var c=r(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?p.actions.get("selectParent").funct():
-c==b?(d=m.getOutgoingEdges(a),null!=d&&0<d.length&&m.setSelectionCell(m.model.getTerminal(d[0],!1))):(c=m.getIncomingEdges(a),null!=c&&0<c.length&&(d=h(m.model.getTerminal(c[0],!0),d,a),c=m.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&m.setSelectionCell(d[c].cell)))))}var p=this,m=p.editor.graph,t=m.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
-mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var x=p.menus.createPopupMenu;p.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==m.getSelectionCount()){c=m.getSelectionCell();var f=m.getOutgoingEdges(c);a.addSeparator();null!=f&&0<f.length&&(b(m.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(m.getSelectionCell())&&(a.addSeparator(),0<m.getIncomingEdges(c).length&&
-this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};p.actions.addAction("selectChildren",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(m.model.getTerminal(a[c],!1));m.setSelectionCells(b)}}},null,null,"Alt+Shift+X");p.actions.addAction("selectSiblings",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getIncomingEdges(a);if(null!=a&&0<a.length&&
-(a=m.getOutgoingEdges(m.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(m.model.getTerminal(a[c],!1));m.setSelectionCells(b)}}},null,null,"Alt+Shift+S");p.actions.addAction("selectParent",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getIncomingEdges(a);null!=a&&0<a.length&&m.setSelectionCell(m.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=
-m.getSelectionCell(),b=[];m.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});m.setSelectionCells(b)}},null,null,"Alt+Shift+D");var w=m.removeCells;m.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var f=[],g=0;g<a.length;g++){var h=a[g];t.isEdge(h)&&d(h)&&(f.push(h),h=t.getTerminal(h,!1));b(h)?(m.traverse(h,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0}),h=m.getIncomingEdges(a[g]),
-a=a.concat(h)):f.push(a[g])}a=f;return w.apply(this,arguments)};p.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var D=m.duplicateCells;m.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),f=0;f<d.length;f++){var g=m.view.getState(d[f]);if(null!=g&&b(g.cell))for(var h=m.getIncomingEdges(g.cell),g=0;g<h.length;g++)mxUtils.remove(h[g],a)}this.model.beginUpdate();try{var k=D.call(this,a,c);if(k.length==
-a.length)for(f=0;f<a.length;f++)if(b(a[f])){var l=m.getIncomingEdges(k[f]),h=m.getIncomingEdges(a[f]);if(0==l.length&&0<h.length){var n=this.cloneCell(h[0]);this.addEdge(n,m.getDefaultParent(),this.model.getTerminal(h[0],!0),k[f])}}}finally{this.model.endUpdate()}return k};var y=m.moveCells;m.moveCells=function(a,c,d,f,g,h,k){var l=null;this.model.beginUpdate();try{var n=g,q=this.view.getState(g),t=null!=q?q.style:this.getCellStyle(g);if(null!=a&&b(g)&&"1"==mxUtils.getValue(t,"treeFolding","0")){for(var p=
-0;p<a.length;p++)if(b(a[p])||m.model.isEdge(a[p])&&null==m.model.getTerminal(a[p],!0)){g=m.model.getParent(a[p]);break}if(null!=n&&g!=n&&null!=this.view.getState(a[0])){var r=m.getIncomingEdges(a[0]);if(0<r.length){var v=m.view.getState(m.model.getTerminal(r[0],!0));if(null!=v){var u=m.view.getState(n);null!=u&&(c=(u.getCenterX()-v.getCenterX())/m.view.scale,d=(u.getCenterY()-v.getCenterY())/m.view.scale)}}}}l=y.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))b(n)&&
-0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],n,!0);else if(b(a[p])&&(r=m.getIncomingEdges(a[p]),0<r.length))if(!f)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],n,!0);else if(0==m.getIncomingEdges(l[p]).length){q=n;if(null==q||q==m.model.getParent(a[p]))q=m.model.getTerminal(r[0],!0);f=this.cloneCell(r[0]);this.addEdge(f,m.getDefaultParent(),q,l[p])}}finally{this.model.endUpdate()}return l};if(null!=p.sidebar){var v=p.sidebar.dropAndConnect;
-p.sidebar.dropAndConnect=function(a,c,d,f){var g=m.model,h=null;g.beginUpdate();try{if(h=v.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(g.isEdge(h[k])&&null==g.getTerminal(h[k],!0)){g.setTerminal(h[k],a,!0);var l=m.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return h}}var A={88:p.actions.get("selectChildren"),84:p.actions.get("selectSubtree"),80:p.actions.get("selectParent"),83:p.actions.get("selectSiblings")},F=
-p.onKeyDown;p.onKeyDown=function(a){try{if(m.isEnabled()&&!m.isEditing()&&b(m.getSelectionCell())&&1==m.getSelectionCount()){var d=null;0<m.getIncomingEdges(m.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(m.getSelectionCell()):g(m.getSelectionCell()):13==a.which&&(d=u(m.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&m.model.isEdge(d[0])?m.setSelectionCell(m.model.getTerminal(d[0],!1)):m.setSelectionCell(d[d.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(m.view.getState(m.getSelectionCell())),
+a]);m.model.setTerminal(d[0],a,!0);var c=m.getOutgoingEdges(a),f=b.geometry,g=[];m.view.currentRoot==b&&(f=new mxRectangle);for(var h=0;h<c.length;h++){var k=m.model.getTerminal(c[h],!1);null!=k&&g.push(k)}var l=m.view.getBounds(g),n=r(a),q=m.view.translate,p=m.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-q.x-f.x+10,d[1].geometry.y+=a.geometry.height-f.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
+null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/p-q.x+-f.x+10,d[1].geometry.y-=d[1].geometry.height-f.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-f.x+40):d[1].geometry.x+(a.geometry.width-f.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/p-q.y+-f.y+10);return m.addCells(d,b)}finally{m.model.endUpdate()}}function h(a,b,c){a=m.getOutgoingEdges(a);c=m.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var f=0;f<a.length;f++){var g=m.view.getState(m.model.getTerminal(a[f],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,b){var c=r(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.actions.get("selectParent").funct():
+c==b?(d=m.getOutgoingEdges(a),null!=d&&0<d.length&&m.setSelectionCell(m.model.getTerminal(d[0],!1))):(c=m.getIncomingEdges(a),null!=c&&0<c.length&&(d=h(m.model.getTerminal(c[0],!0),d,a),c=m.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&m.setSelectionCell(d[c].cell)))))}var t=this,m=t.editor.graph,q=m.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");
+mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var x=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==m.getSelectionCount()){c=m.getSelectionCell();var f=m.getOutgoingEdges(c);a.addSeparator();null!=f&&0<f.length&&(b(m.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(m.getSelectionCell())&&(a.addSeparator(),0<m.getIncomingEdges(c).length&&
+this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};t.actions.addAction("selectChildren",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(m.model.getTerminal(a[c],!1));m.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getIncomingEdges(a);if(null!=a&&0<a.length&&
+(a=m.getOutgoingEdges(m.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(m.model.getTerminal(a[c],!1));m.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=m.getSelectionCell(),a=m.getIncomingEdges(a);null!=a&&0<a.length&&m.setSelectionCell(m.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(){if(m.isEnabled()&&1==m.getSelectionCount()){var a=
+m.getSelectionCell(),b=[];m.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});m.setSelectionCells(b)}},null,null,"Alt+Shift+D");var w=m.removeCells;m.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var f=[],g=0;g<a.length;g++){var h=a[g];q.isEdge(h)&&d(h)&&(f.push(h),h=q.getTerminal(h,!1));b(h)?(m.traverse(h,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0}),h=m.getIncomingEdges(a[g]),
+a=a.concat(h)):f.push(a[g])}a=f;return w.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var E=m.duplicateCells;m.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),f=0;f<d.length;f++){var g=m.view.getState(d[f]);if(null!=g&&b(g.cell))for(var h=m.getIncomingEdges(g.cell),g=0;g<h.length;g++)mxUtils.remove(h[g],a)}this.model.beginUpdate();try{var k=E.call(this,a,c);if(k.length==
+a.length)for(f=0;f<a.length;f++)if(b(a[f])){var l=m.getIncomingEdges(k[f]),h=m.getIncomingEdges(a[f]);if(0==l.length&&0<h.length){var n=this.cloneCell(h[0]);this.addEdge(n,m.getDefaultParent(),this.model.getTerminal(h[0],!0),k[f])}}}finally{this.model.endUpdate()}return k};var y=m.moveCells;m.moveCells=function(a,c,d,f,g,h,k){var l=null;this.model.beginUpdate();try{var n=g,q=this.view.getState(g),p=null!=q?q.style:this.getCellStyle(g);if(null!=a&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var r=
+0;r<a.length;r++)if(b(a[r])||m.model.isEdge(a[r])&&null==m.model.getTerminal(a[r],!0)){g=m.model.getParent(a[r]);break}if(null!=n&&g!=n&&null!=this.view.getState(a[0])){var v=m.getIncomingEdges(a[0]);if(0<v.length){var t=m.view.getState(m.model.getTerminal(v[0],!0));if(null!=t){var u=m.view.getState(n);null!=u&&(c=(u.getCenterX()-t.getCenterX())/m.view.scale,d=(u.getCenterY()-t.getCenterY())/m.view.scale)}}}}l=y.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(r=0;r<l.length;r++)if(this.model.isEdge(l[r]))b(n)&&
+0>mxUtils.indexOf(l,this.model.getTerminal(l[r],!0))&&this.model.setTerminal(l[r],n,!0);else if(b(a[r])&&(v=m.getIncomingEdges(a[r]),0<v.length))if(!f)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],n,!0);else if(0==m.getIncomingEdges(l[r]).length){q=n;if(null==q||q==m.model.getParent(a[r]))q=m.model.getTerminal(v[0],!0);f=this.cloneCell(v[0]);this.addEdge(f,m.getDefaultParent(),q,l[r])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var v=t.sidebar.dropAndConnect;
+t.sidebar.dropAndConnect=function(a,c,d,f){var g=m.model,h=null;g.beginUpdate();try{if(h=v.apply(this,arguments),b(a))for(var k=0;k<h.length;k++)if(g.isEdge(h[k])&&null==g.getTerminal(h[k],!0)){g.setTerminal(h[k],a,!0);var l=m.getCellGeometry(h[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return h}}var A={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},G=
+t.onKeyDown;t.onKeyDown=function(a){try{if(m.isEnabled()&&!m.isEditing()&&b(m.getSelectionCell())&&1==m.getSelectionCount()){var d=null;0<m.getIncomingEdges(m.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(m.getSelectionCell()):g(m.getSelectionCell()):13==a.which&&(d=u(m.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&m.model.isEdge(d[0])?m.setSelectionCell(m.model.getTerminal(d[0],!1)):m.setSelectionCell(d[d.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(m.view.getState(m.getSelectionCell())),
m.startEditingAtCell(m.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var f=A[a.keyCode];null!=f&&(f.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(l(m.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(l(m.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(l(m.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(l(m.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(N){console.log("error",N)}mxEvent.isConsumed(a)||F.apply(this,arguments)};var P=m.connectVertex;m.connectVertex=function(a,d,f,h,k,l){var n=m.getIncomingEdges(a);return b(a)&&0<n.length?(f=r(a),h=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f==d?g(a):h==k?c(a):u(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):P.call(this,a,d,f,h,k,l)};m.getSubtree=function(a){var c=[a];b(a)&&
-!f(a)&&m.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
+mxEvent.consume(a))}}catch(O){console.log("error",O)}mxEvent.isConsumed(a)||G.apply(this,arguments)};var Q=m.connectVertex;m.connectVertex=function(a,d,f,h,k,l){var n=m.getIncomingEdges(a);return b(a)&&0<n.length?(f=r(a),h=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f==d?g(a):h==k?c(a):u(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):Q.call(this,a,d,f,h,k,l)};m.getSubtree=function(a){var c=[a];b(a)&&
+!f(a)&&m.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
"18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var L=mxVertexHandler.prototype.destroy;
-mxVertexHandler.prototype.destroy=function(a,b){L.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
+this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var M=mxVertexHandler.prototype.destroy;
+mxVertexHandler.prototype.destroy=function(a,b){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,
40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!0);d.insertEdge(c,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
f.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");h.geometry.relative=!0;h.edge=!0;b.insertEdge(h,!0);f.insertEdge(h,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);k.insertEdge(n,!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");m.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);m.insertEdge(t,!1);a.insert(c);a.insert(h);a.insert(n);a.insert(t);a.insert(b);a.insert(d);a.insert(f);a.insert(k);a.insert(m);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);k.insertEdge(n,!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");m.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);m.insertEdge(q,!1);a.insert(c);a.insert(h);a.insert(n);a.insert(q);a.insert(b);a.insert(d);a.insert(f);a.insert(k);a.insert(m);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var d=new mxCell("Organization",
@@ -3270,13 +3290,13 @@ h.className="geTitle";b.appendChild(h);return h}var d=document.createElement("di
"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";g=document.createElement("span");g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("openLibrary"));d.appendChild(g);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=
c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());
a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var d=document.createElement("style");d.type="text/css";d.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane * { font-size:9pt; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(t){}var k=function(a,b,c,d,f,g,h){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";h(a);this.window=new mxWindow(b,a,c,d,f,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(q){}var k=function(a,b,c,d,f,g,h){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";h(a);this.window=new mxWindow(b,a,c,d,f,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=
Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;
HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var n=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=
-"30px");n.apply(this,arguments)};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var r=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>f&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):r.apply(this,arguments)};var u=App.prototype.updateUserElement;App.prototype.updateUserElement=
+"30px");n.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var r=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>f&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):r.apply(this,arguments)};var u=App.prototype.updateUserElement;App.prototype.updateUserElement=
function(){u.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"))}};
var c=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){c.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height=
"24px";a.style.width="24px"}null!=this.syncButton&&(a=this.syncButton,a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;",a.className="geToolbarButton",a.innerHTML="",a.style.backgroundImage="url("+Editor.syncImage+")",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.backgroundSize="24px 24px",a.style.height="24px",a.style.width="24px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=
@@ -3287,8 +3307,8 @@ a.y+=40;return a};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPo
c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-","lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,
["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var h=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),
this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=
-null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);h.apply(this,arguments)};var l=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){l.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var p=Menus.prototype.init;
-Menus.prototype.init=function(){p.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importFile",new Action("File...",function(){d.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type",
+null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);h.apply(this,arguments)};var l=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){l.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var t=Menus.prototype.init;
+Menus.prototype.init=function(){t.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importFile",new Action("File...",function(){d.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type",
"file");mxEvent.addListener(a,"change",function(){null!=a.files&&c.importFiles(a.files,null,null,c.maxImageSize)});a.click()}));c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+
"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,"Insert from Text","plantUml");c.showDialog(a.container,
620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();c.menus.addSubmenu("extras",a,b,mxResources.get("preferences"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(c.menus.addMenuItems(a,["new","open","-"],b),EditorUi.isElectronApp&&c.menus.addMenuItems(a,["synchronize","-"],b),c.menus.addMenuItems(a,["save","saveAs","-"],b)):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,
@@ -3312,15 +3332,15 @@ d.funct,null,mxResources.get("redo")+" ("+d.shortcut+")",d,"data:image/svg+xml;b
c([b("",function(){k.popupMenuHandler.hideMenu();var a=k.view.scale,b=k.view.translate.x,c=k.view.translate.y;h.actions.get("resetView").funct();1E-5>Math.abs(a-k.view.scale)&&b==k.view.translate.x&&c==k.view.translate.y&&h.actions.get(k.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",m,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=f?b("",d.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=f?b("",g.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null],60)}d=h.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==N&&(g=p.addMenu("",d.funct),g.setAttribute("title",mxResources.get("language")),g.className="geToolbarButton",g.style.backgroundImage="url("+Editor.globeImage+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.position="absolute",g.style.height="24px",g.style.width="24px",g.style.zIndex="1",g.style.top="11px",g.style.right=
-"8px",g.style.cursor="pointer",l.appendChild(g),N=g),h.buttonContainer.style.paddingRight="34px"):(h.buttonContainer.style.paddingRight="4px",null!=N&&(N.parentNode.removeChild(N),N=null))}m.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);var h=this,k=h.editor.graph;h.toolbar=this.createToolbar(h.createDiv("geToolbar"));
+null],60)}d=h.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==O&&(g=p.addMenu("",d.funct),g.setAttribute("title",mxResources.get("language")),g.className="geToolbarButton",g.style.backgroundImage="url("+Editor.globeImage+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.position="absolute",g.style.height="24px",g.style.width="24px",g.style.zIndex="1",g.style.top="11px",g.style.right=
+"8px",g.style.cursor="pointer",l.appendChild(g),O=g),h.buttonContainer.style.paddingRight="34px"):(h.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}m.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);var h=this,k=h.editor.graph;h.toolbar=this.createToolbar(h.createDiv("geToolbar"));
h.defaultLibraryName=mxResources.get("untitledLibrary");var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(h,l);h.statusContainer=h.createStatusContainer();h.statusContainer.style.position="relative";h.statusContainer.style.maxWidth="";h.statusContainer.style.marginTop="7px";h.statusContainer.style.marginLeft=
-"6px";h.statusContainer.style.color="gray";h.statusContainer.style.cursor="default";h.editor.addListener("statusChanged",mxUtils.bind(this,function(){h.setStatusText(h.editor.getStatus())}));var q=h.descriptorChanged;h.descriptorChanged=function(){q.apply(this,arguments);var a=h.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);l.setAttribute("title",a.getTitle()+(null!=b?" ("+b+
+"6px";h.statusContainer.style.color="gray";h.statusContainer.style.cursor="default";h.editor.addListener("statusChanged",mxUtils.bind(this,function(){h.setStatusText(h.editor.getStatus())}));var r=h.descriptorChanged;h.descriptorChanged=function(){r.apply(this,arguments);var a=h.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);l.setAttribute("title",a.getTitle()+(null!=b?" ("+b+
")":""))}else l.removeAttribute("title")};h.setStatusText(h.editor.getStatus());l.appendChild(h.statusContainer);h.buttonContainer=document.createElement("div");h.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";l.appendChild(h.buttonContainer);h.menubarContainer=h.buttonContainer;h.tabContainer=document.createElement("div");h.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";
-var g=h.diagramContainer.parentNode,r=document.createElement("div");r.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";h.diagramContainer.style.top="47px";var u=h.menus.get("viewZoom");if(null!=u){this.tabContainer.style.right="70px";var B=p.addMenu("100%",u.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";
+var g=h.diagramContainer.parentNode,t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";h.diagramContainer.style.top="47px";var u=h.menus.get("viewZoom");if(null!=u){this.tabContainer.style.right="70px";var B=p.addMenu("100%",u.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";
B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration="none";B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";
-B.style.height=parseInt(h.tabContainer.style.height)-1+"px";B.style.lineHeight=parseInt(h.tabContainer.style.height)+1+"px";r.appendChild(B);u=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*h.editor.graph.view.scale)+"%"});h.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);h.editor.addListener("resetGraphView",u);h.editor.addListener("pageSelected",u);var J=h.setGraphEnabled;h.setGraphEnabled=function(){J.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,
-this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}r.appendChild(h.tabContainer);r.appendChild(l);r.appendChild(h.diagramContainer);g.appendChild(r);h.updateTabContainer();var N=null;d();mxEvent.addListener(window,"resize",function(){d();null!=h.sidebarWindow&&h.sidebarWindow.window.fit();null!=h.formatWindow&&h.formatWindow.window.fit();null!=h.actions.outlineWindow&&h.actions.outlineWindow.window.fit();null!=h.actions.layersWindow&&h.actions.layersWindow.window.fit();
+B.style.height=parseInt(h.tabContainer.style.height)-1+"px";B.style.lineHeight=parseInt(h.tabContainer.style.height)+1+"px";t.appendChild(B);u=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*h.editor.graph.view.scale)+"%"});h.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);h.editor.addListener("resetGraphView",u);h.editor.addListener("pageSelected",u);var K=h.setGraphEnabled;h.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,
+this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?"30px":"0px")}}t.appendChild(h.tabContainer);t.appendChild(l);t.appendChild(h.diagramContainer);g.appendChild(t);h.updateTabContainer();var O=null;d();mxEvent.addListener(window,"resize",function(){d();null!=h.sidebarWindow&&h.sidebarWindow.window.fit();null!=h.formatWindow&&h.formatWindow.window.fit();null!=h.actions.outlineWindow&&h.actions.outlineWindow.window.fit();null!=h.actions.layersWindow&&h.actions.layersWindow.window.fit();
null!=h.menus.tagsWindow&&h.menus.tagsWindow.window.fit();null!=h.menus.findWindow&&h.menus.findWindow.window.fit()})}}};(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Download draw.io Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for '{1}'\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><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 as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,f){this.init(a,b,f)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1;
GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;
@@ -3339,22 +3359,22 @@ GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view
GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),f=!1;a.style.overflow="hidden";var d=mxUtils.bind(this,function(){if(!f){f=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<=b.width+2*this.graph.border*this.graph.view.scale?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,
top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}f=!1}}),k=null,n=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==k||n||(n=!0,this.graph.maxFitScale=
null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(function(){n=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",
-d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var q=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(q);n||(q=window.setTimeout(mxUtils.bind(this,
+d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(p);n||(p=window.setTimeout(mxUtils.bind(this,
this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var r=mxUtils.bind(this,function(){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var c=
null;null!=this.graphConfig["max-height"]&&(c=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(c)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(r,0):r();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;r()}};
GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var f=this.graphConfig.layers;if(null!=f||null!=b)if(f=null!=f?f.split(" "):null,null!=b||0<f.length){var d=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var n=k.getChildCount(k.root),q=0;q<n;q++)k.setVisible(k.getChildAt(k.root,q),null!=b?d.isVisible(d.getChildAt(d.root,q)):!1);if(null==d)for(q=0;q<f.length;q++)k.setVisible(k.getChildAt(k.root,parseInt(f[q])),!0)}finally{k.endUpdate()}}};
+GraphViewer.prototype.showLayers=function(a,b){var f=this.graphConfig.layers;if(null!=f||null!=b)if(f=null!=f?f.split(" "):null,null!=b||0<f.length){var d=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var n=k.getChildCount(k.root),p=0;p<n;p++)k.setVisible(k.getChildAt(k.root,p),null!=b?d.isVisible(d.getChildAt(d.root,p)):!1);if(null==d)for(p=0;p<f.length;p++)k.setVisible(k.getChildAt(k.root,parseInt(f[p])),!0)}finally{k.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var h=document.createElement("div");h.style.borderRight="1px solid #d0d0d0";h.style.padding="3px 6px 3px 6px";mxEvent.addListener(h,"click",a);null!=c&&h.setAttribute("title",c);h.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(h,"mouseenter",function(){h.style.backgroundColor="#ddd"}),mxEvent.addListener(h,"mouseleave",
function(){h.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),h.style.cursor="pointer"):mxUtils.setOpacity(h,30);h.appendChild(a);f.appendChild(h);g++;return h}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var f=b.ownerDocument.createElement("div");f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";
f.style.whiteSpace="nowrap";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="#eee";f.style.height=this.toolbarHeight+"px";this.toolbar=f;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(f,30);var d=null,k=null,n=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,
-0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),n())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":
-"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){q(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){q(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var r=this.graph,u=r.getTolerance();r.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-r.container.scrollLeft;this.scrollTop=r.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-r.container.scrollLeft)<u&&Math.abs(this.scrollTop-r.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(f.style.opacity||0)?n():q(30))}})}for(var c=this.toolbarItems,g=0,h=null,l=null,p=0;p<c.length;p++){var m=c[p];if("pages"==m){l=b.ownerDocument.createElement("div");
-l.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(l,70);var t=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");t.style.borderRightStyle="none";t.style.paddingLeft="0px";t.style.paddingRight="0px";f.appendChild(l);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";m=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";t.style.display=l.style.display;x.style.display=l.style.display});this.addListener("graphChanged",m);m()}else if("zoom"==m)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==m){if(this.layersEnabled){var w=this.graph.getModel(),D=a(mxUtils.bind(this,function(a){if(null!=h)h.parentNode.removeChild(h),
-h=null;else{h=this.graph.createLayersDialog();mxEvent.addListener(h,"mouseleave",function(){h.parentNode.removeChild(h);h=null});a=D.getBoundingClientRect();h.style.width="140px";h.style.padding="2px 0px 2px 0px";h.style.border="1px solid #d0d0d0";h.style.backgroundColor="#eee";h.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";h.style.fontSize="11px";h.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(h,80);var b=mxUtils.getDocumentScrollOrigin(document);h.style.left=b.x+a.left+
-"px";h.style.top=b.y+a.bottom+"px";document.body.appendChild(h)}}),Editor.layersImage,mxResources.get("layers")||"Layers");w.addListener(mxEvent.CHANGE,function(){D.style.display=1<w.getChildCount(w.root)?"inline-block":"none"});D.style.display=1<w.getChildCount(w.root)?"inline-block":"none"}}else"lightbox"==m?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(m=this.graphConfig["toolbar-buttons"][m],
+0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),n())}));mxEvent.addListener(f,mxClient.IS_POINTER?"pointermove":
+"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var r=this.graph,u=r.getTolerance();r.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
+r.container.scrollLeft;this.scrollTop=r.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-r.container.scrollLeft)<u&&Math.abs(this.scrollTop-r.container.scrollTop)<u&&Math.abs(this.startX-b.getGraphX())<u&&Math.abs(this.startY-b.getGraphY())<u&&(0<parseFloat(f.style.opacity||0)?n():p(30))}})}for(var c=this.toolbarItems,g=0,h=null,l=null,t=0;t<c.length;t++){var m=c[t];if("pages"==m){l=b.ownerDocument.createElement("div");
+l.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(l,70);var q=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");q.style.borderRightStyle="none";q.style.paddingLeft="0px";q.style.paddingRight="0px";f.appendChild(l);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";m=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";q.style.display=l.style.display;x.style.display=l.style.display});this.addListener("graphChanged",m);m()}else if("zoom"==m)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==m){if(this.layersEnabled){var w=this.graph.getModel(),E=a(mxUtils.bind(this,function(a){if(null!=h)h.parentNode.removeChild(h),
+h=null;else{h=this.graph.createLayersDialog();mxEvent.addListener(h,"mouseleave",function(){h.parentNode.removeChild(h);h=null});a=E.getBoundingClientRect();h.style.width="140px";h.style.padding="2px 0px 2px 0px";h.style.border="1px solid #d0d0d0";h.style.backgroundColor="#eee";h.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";h.style.fontSize="11px";h.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(h,80);var b=mxUtils.getDocumentScrollOrigin(document);h.style.left=b.x+a.left+
+"px";h.style.top=b.y+a.bottom+"px";document.body.appendChild(h)}}),Editor.layersImage,mxResources.get("layers")||"Layers");w.addListener(mxEvent.CHANGE,function(){E.style.display=1<w.getChildCount(w.root)?"inline-block":"none"});E.style.display=1<w.getChildCount(w.root)?"inline-block":"none"}}else"lightbox"==m?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(m=this.graphConfig["toolbar-buttons"][m],
null!=m&&a(null==m.enabled||m.enabled?m.handler:function(){},m.image,m.title,m.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*g);null!=this.graphConfig.title&&(c=b.ownerDocument.createElement("div"),c.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",c.setAttribute("title",this.graphConfig.title),mxUtils.write(c,this.graphConfig.title),mxUtils.setOpacity(c,
70),f.appendChild(c));this.minToolbarWidth=34*g;var y=b.style.border,c=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};f.style.left=a.left+"px";f.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
f.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?f.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(f.style.marginTop=-this.toolbarHeight+"px",f.style.top=a.top+1+"px"):f.style.top=a.top+"px";"1px solid transparent"==y&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(f);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=f.parentNode&&f.parentNode.removeChild(f),null!=h&&(h.parentNode.removeChild(h),
@@ -3367,18 +3387,18 @@ GraphViewer.prototype.showLightbox=function(a,b,f){if("open"==this.graphConfig.l
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(f.style.position="absolute",f.style.right="32px",f.style.top=a.y+32+"px"):f.style.cssText="position:fixed;top:32px;right:32px;";f.style.cursor="pointer";mxEvent.addListener(f,"click",function(){d.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||
10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var d=new EditorUi(new Editor(!0),document.createElement("div"),!0);d.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";d.refresh=
-function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),n=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(f);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;n.apply(this,arguments)};var q=d.editor.graph,r=q.container;r.style.overflow="hidden";this.lightboxChrome?(r.style.border="1px solid #c0c0c0",r.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",k)):(b.style.display="none",f.style.display="none");var u=this;q.getImageFromBundles=function(a){return u.getImageUrl(a)};var c=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return u.getImageUrl(a)};return a};this.graphConfig.move&&(q.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(r.style,"border-radius","4px"),r.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(r.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(r.style,"transition","all .25s ease-in-out"));this.addClickHandler(q,d);window.setTimeout(mxUtils.bind(this,function(){r.style.outline="none";r.style.zIndex=this.lightboxZIndex;f.style.zIndex=this.lightboxZIndex;document.body.appendChild(r);document.body.appendChild(f);d.setFileData(this.xml);mxUtils.setPrefixedStyle(r.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom=
+function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),n=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(f);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;n.apply(this,arguments)};var p=d.editor.graph,r=p.container;r.style.overflow="hidden";this.lightboxChrome?(r.style.border="1px solid #c0c0c0",r.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",k)):(b.style.display="none",f.style.display="none");var u=this;p.getImageFromBundles=function(a){return u.getImageUrl(a)};var c=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return u.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(r.style,"border-radius","4px"),r.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(r.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(r.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,d);window.setTimeout(mxUtils.bind(this,function(){r.style.outline="none";r.style.zIndex=this.lightboxZIndex;f.style.zIndex=this.lightboxZIndex;document.body.appendChild(r);document.body.appendChild(f);d.setFileData(this.xml);mxUtils.setPrefixedStyle(r.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom=
"60px";d.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(d.chromelessToolbar);d.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(r.style.position="absolute",r.style.display="block",r.style.left=a.x+"px",r.style.top=a.y+"px",r.style.width=document.body.clientWidth-80+"px",r.style.height=document.body.clientHeight-80+"px",r.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute",
-d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(q,this.graph);mxEvent.addListener(b,"click",function(){d.destroy()})}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(f){throw a.innerHTML=f.message,f;}})};
+d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(p,this.graph);mxEvent.addListener(b,"click",function(){d.destroy()})}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(f){throw a.innerHTML=f.message,f;}})};
GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var f=0;f<b.length;f++)a.push(b[f]);return a}for(var d=document.getElementsByTagName("*"),b=[],f=0;f<d.length;f++){var k=d[f].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[f]))}return b};
GraphViewer.createViewerForElement=function(a,b){var f=a.getAttribute("data-mxgraph");if(null!=f){var d=JSON.parse(f),k=function(f){f=mxUtils.parseXml(f);f=new GraphViewer(a,f.documentElement,d);null!=b&&b(f)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}};
GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,f){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=f;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(f,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function n(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached=
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(f,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function n(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==n(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],f=d.childNodes[0],g=b.resizeSensor.childNodes[1],h=function(){f.style.width="100000px";f.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};h();var l=!1,q=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(q))};a(q);var r,u,A,F,P=function(){if((A=b.offsetWidth)!=r||(F=b.offsetHeight)!=u)l=!0,r=A,u=F;h()},E=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};E(d,"scroll",P);E(g,"scroll",P)}var r=function(){GraphViewer.resizeSensorEnabled&&d()},u=Object.prototype.toString.call(f),c="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&f instanceof jQuery||"undefined"!==typeof Elements&&f instanceof Elements;if(c)for(var u=0,g=f.length;u<g;u++)q(f[u],r);else q(f,r);this.detach=function(){if(c)for(var a=0,d=f.length;a<d;a++)b.detach(f[a]);else b.detach(f)}};
+b.appendChild(b.resizeSensor);"static"==n(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],f=d.childNodes[0],g=b.resizeSensor.childNodes[1],h=function(){f.style.width="100000px";f.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};h();var l=!1,p=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(p))};a(p);var r,v,u,G,Q=function(){if((u=b.offsetWidth)!=r||(G=b.offsetHeight)!=v)l=!0,r=u,v=G;h()},F=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};F(d,"scroll",Q);F(g,"scroll",Q)}var r=function(){GraphViewer.resizeSensorEnabled&&d()},u=Object.prototype.toString.call(f),c="[object Array]"===u||"[object NodeList]"===u||"[object HTMLCollection]"===u||"undefined"!==typeof jQuery&&f instanceof jQuery||"undefined"!==typeof Elements&&f instanceof Elements;if(c)for(var u=0,g=f.length;u<g;u++)p(f[u],r);else p(f,r);this.detach=function(){if(c)for(var a=0,d=f.length;a<d;a++)b.detach(f[a]);else b.detach(f)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/shapes/mxArrows.js b/src/main/webapp/shapes/mxArrows.js
index 950a638e..1e6f87cf 100644
--- a/src/main/webapp/shapes/mxArrows.js
+++ b/src/main/webapp/shapes/mxArrows.js
@@ -124,8 +124,6 @@ mxShapeArrows2Arrow.prototype.getLabelBounds = function(rect)
mxCellRenderer.registerShape(mxShapeArrows2Arrow.prototype.cst.ARROW, mxShapeArrows2Arrow);
-mxShapeArrows2Arrow.prototype.constraints = null;
-
Graph.handleFactory[mxShapeArrows2Arrow.prototype.cst.ARROW] = function(state)
{
var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)
@@ -156,6 +154,27 @@ Graph.handleFactory[mxShapeArrows2Arrow.prototype.cst.ARROW] = function(state)
}
+mxShapeArrows2Arrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, h - dy));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Two Way Arrow
//**********************************************************************************************************************************************************
@@ -271,6 +290,28 @@ Graph.handleFactory[mxShapeArrows2TwoWayArrow.prototype.cst.TWO_WAY_ARROW] = fun
}
+mxShapeArrows2TwoWayArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false, null, 0, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false, null, 0, h - dy));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Stylised Arrow
//**********************************************************************************************************************************************************
@@ -379,6 +420,28 @@ Graph.handleFactory[mxShapeArrows2StylisedArrow.prototype.cst.STYLISED_ARROW] =
}
+mxShapeArrows2StylisedArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+ var feather = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'feather', this.feather))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, feather));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - feather));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx - 10, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx - 10, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, (dy + feather) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, h - (dy + feather) * 0.5));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Sharp Arrow
//**********************************************************************************************************************************************************
@@ -429,7 +492,6 @@ mxShapeArrows2SharpArrow.prototype.paintVertexShape = function(c, x, y, w, h)
var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
var dx1a = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
var dy1a = h * 0.5 * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
-
var x2 = 0;
if (h != 0)
@@ -498,6 +560,38 @@ Graph.handleFactory[mxShapeArrows2SharpArrow.prototype.cst.SHARP_ARROW] = functi
}
+mxShapeArrows2SharpArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
+ var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
+ var dx2 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
+ var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+ var dx1a = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
+ var dy1a = h * 0.5 * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
+ var x2 = 0;
+
+ if (h != 0)
+ {
+ x2 = dx1a + dx2 * dy1a * 2 / h;
+ }
+
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - x2, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx2, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h - dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - x2, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx2, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1) * 0.5, dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1) * 0.5, h - dy1));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Sharp Arrow2
//**********************************************************************************************************************************************************
@@ -549,14 +643,10 @@ mxShapeArrows2SharpArrow2.prototype.paintVertexShape = function(c, x, y, w, h)
var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
-
var dx2 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
-
var dy3 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy3', this.dy3))));
var dx3 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx3', this.dx3))));
-
var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
-
var dx1a = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
var dy1a = h * 0.5 * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
@@ -634,6 +724,34 @@ Graph.handleFactory[mxShapeArrows2SharpArrow2.prototype.cst.SHARP_ARROW2] = func
return handles;
}
+mxShapeArrows2SharpArrow2.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
+ var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
+ var dx2 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
+ var dy3 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy3', this.dy3))));
+ var dx3 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx3', this.dx3))));
+ var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+ var dx1a = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
+ var dy1a = h * 0.5 * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx3, dy3));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx2, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h - dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx3, h - dy3));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx2, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1) * 0.5, dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1) * 0.5, h - dy1));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Callout Arrow
//**********************************************************************************************************************************************************
@@ -748,6 +866,33 @@ Graph.handleFactory[mxShapeArrows2CalloutArrow.prototype.cst.CALLOUT_ARROW] = fu
return handles;
}
+mxShapeArrows2CalloutArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null,notch, h * 0.5 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 + dy + arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, h * 0.5 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch * 0.5 , 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch * 0.5 , h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, (notch + w - dx) * 0.5, -dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, (notch + w - dx) * 0.5, dy));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Bend Arrow
//**********************************************************************************************************************************************************
@@ -804,6 +949,7 @@ mxShapeArrows2BendArrow.prototype.paintVertexShape = function(c, x, y, w, h)
c.lineTo(w, arrowHead * 0.5);
c.lineTo(w - dx, arrowHead);
c.lineTo(w - dx, arrowHead / 2 + dy);
+
if (rounded == '1')
{
c.lineTo(dy * 2.2, arrowHead / 2 + dy);
@@ -884,6 +1030,42 @@ Graph.handleFactory[mxShapeArrows2BendArrow.prototype.cst.BEND_ARROW] = function
return handles;
}
+mxShapeArrows2BendArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var notch = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+ var rounded = mxUtils.getValue(this.style, 'rounded', '0');
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx + dy * 2) * 0.5, arrowHead / 2 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead / 2 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, arrowHead * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead / 2 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx + dy * 2) * 0.5, arrowHead / 2 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dy * 2, (h - arrowHead / 2 - dy) * 0.5 + arrowHead / 2 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dy * 2, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dy, h - notch));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - arrowHead / 2 - dy) * 0.5 + arrowHead / 2 + dy));
+
+ if (rounded == '1')
+ {
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dy * 0.586, arrowHead / 2 - dy * 0.414));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 2 * dy + dy * 0.0586, arrowHead / 2 + dy + dy * 0.0586));
+ }
+ else
+ {
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, arrowHead / 2 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dy * 2, arrowHead / 2 + dy));
+ }
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Bend Double Arrow
//**********************************************************************************************************************************************************
@@ -938,6 +1120,7 @@ mxShapeArrows2BendDoubleArrow.prototype.paintVertexShape = function(c, x, y, w,
c.lineTo(w, arrowHead * 0.5);
c.lineTo(w - dx, arrowHead);
c.lineTo(w - dx, arrowHead / 2 + dy);
+
if (rounded == '1')
{
c.lineTo(arrowHead / 2 + dy * 1.2, arrowHead / 2 + dy);
@@ -1006,6 +1189,42 @@ Graph.handleFactory[mxShapeArrows2BendDoubleArrow.prototype.cst.BEND_DOUBLE_ARRO
}
+mxShapeArrows2BendDoubleArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var arrowHead = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+ var rounded = mxUtils.getValue(this.style, 'rounded', '0');
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx , 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, arrowHead * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead / 2 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (arrowHead / 2 + dy + w - dx) * 0.5, arrowHead / 2 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (arrowHead / 2 + dy + w - dx) * 0.5, arrowHead / 2 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 + dy, (arrowHead / 2 + dy + h - dx) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy, (arrowHead / 2 + dy + h - dx) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 + dy, h - dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead, h - dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy, h - dx));
+
+ if (rounded == '1')
+ {
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy * 0.414, arrowHead / 2 - dy * 0.414));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 + dy + dy * 0.0586, arrowHead / 2 + dy + dy * 0.0586));
+ }
+ else
+ {
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy, arrowHead / 2 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 + dy, arrowHead / 2 + dy));
+ }
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Callout Double Arrow
//**********************************************************************************************************************************************************
@@ -1127,6 +1346,34 @@ Graph.handleFactory[mxShapeArrows2CalloutDoubleArrow.prototype.cst.CALLOUT_DOUBL
return handles;
}
+mxShapeArrows2CalloutDoubleArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w / 2 - notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w / 2 + notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false, null, w / 2 - notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false, null, w / 2 + notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 + dy + arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h * 0.5 - dy - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h * 0.5 + dy + arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 1.5 - dx + notch) * 0.5, h * 0.5 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 1.5 - dx + notch) * 0.5, h * 0.5 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - notch) * 0.5, h * 0.5 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - notch) * 0.5, h * 0.5 + dy));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Callout Quad Arrow
//**********************************************************************************************************************************************************
@@ -1262,6 +1509,50 @@ Graph.handleFactory[mxShapeArrows2CalloutQuadArrow.prototype.cst.CALLOUT_QUAD_AR
return handles;
}
+mxShapeArrows2CalloutQuadArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy, h * 0.5 - notch));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + notch, h * 0.5 - notch));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + notch, h * 0.5 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy, h * 0.5 + notch));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + notch, h * 0.5 + notch));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + notch, h * 0.5 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy, h * 0.5 + notch));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - notch, h * 0.5 + notch));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - notch, h * 0.5 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy, h * 0.5 - notch));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - notch, h * 0.5 - notch));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - notch, h * 0.5 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 + dy + arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy - arrowHead, h - dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy + arrowHead, h - dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h * 0.5 - dy - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h * 0.5 + dy + arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy - arrowHead, dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy + arrowHead, dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.75 + (notch - dx) * 0.5, h * 0.5 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.75 + (notch - dx) * 0.5, h * 0.5 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy, h * 0.75 + (notch - dx) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy, h * 0.75 + (notch - dx) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.25 - (notch - dx) * 0.5, h * 0.5 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.25 - (notch - dx) * 0.5, h * 0.5 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy, h * 0.25 - (notch - dx) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy, h * 0.25 - (notch - dx) * 0.5));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Callout Double 90 Arrow
//**********************************************************************************************************************************************************
@@ -1388,6 +1679,34 @@ Graph.handleFactory[mxShapeArrows2CalloutDouble90Arrow.prototype.cst.CALLOUT_DOU
return handles;
}
+mxShapeArrows2CalloutDouble90Arrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
+ var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
+ var dx2 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
+ var dy2 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dy2', this.dy2))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 * 0.5, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + dx2) * 0.5, dy2 * 0.5 - dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, dy2 * 0.5 - dy1 - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy2 * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, dy2 * 0.5 + dy1 + arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + dx2) * 0.5, dy2 * 0.5 + dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2, dy2));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 * 0.5 + dy1, (h - dx1 + dy2) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 * 0.5 - dy1, (h - dx1 + dy2) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 / 2 + dy1 + arrowHead, h - dx1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 / 2, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 / 2 - dy1 - arrowHead, h - dx1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy2));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Quad Arrow
//**********************************************************************************************************************************************************
@@ -1501,6 +1820,37 @@ Graph.handleFactory[mxShapeArrows2QuadArrow.prototype.cst.QUAD_ARROW] = function
return handles;
}
+mxShapeArrows2QuadArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 + dy + arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h * 0.5 - dy - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h * 0.5 + dy + arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy - arrowHead, dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy + arrowHead, dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy - arrowHead, h - dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy + arrowHead, h - dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy, (dx - dy) * 0.5 + h * 0.25));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy, (dx - dy) * 0.5 + h * 0.25));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy, (dy - dx) * 0.5 + h * 0.75));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy, (dy - dx) * 0.5 + h * 0.75));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dx - dy) * 0.5 + w * 0.25, h * 0.5 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dx - dy) * 0.5 + w * 0.25, h * 0.5 + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dy - dx) * 0.5 + w * 0.75, h * 0.5 - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dy - dx) * 0.5 + w * 0.75, h * 0.5 + dy));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Triad Arrow
//**********************************************************************************************************************************************************
@@ -1606,6 +1956,33 @@ Graph.handleFactory[mxShapeArrows2TriadArrow.prototype.cst.TRIAD_ARROW] = functi
return handles;
}
+mxShapeArrows2TriadArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false, null, - arrowHead * 0.5, dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5, h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false, null, arrowHead * 0.5, dx));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h - arrowHead * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - arrowHead * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 1.5 - dx + arrowHead * 0.5 - dy) * 0.5, h - arrowHead + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 1.5 - dx + arrowHead * 0.5 - dy) * 0.5, h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - arrowHead * 0.5 + dy) * 0.5, h - arrowHead + dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - arrowHead * 0.5 + dy) * 0.5, h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - arrowHead * 0.5 + dy, (dx + h - arrowHead + dy) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + arrowHead * 0.5 - dy, (dx + h - arrowHead + dy) * 0.5));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Tailed Arrow
//**********************************************************************************************************************************************************
@@ -1658,7 +2035,6 @@ mxShapeArrows2TailedArrow.prototype.paintVertexShape = function(c, x, y, w, h)
var dx2 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
-
var x2 = 0;
if (dy2 != 0)
@@ -1747,6 +2123,36 @@ Graph.handleFactory[mxShapeArrows2TailedArrow.prototype.cst.TAILED_ARROW] = func
return handles;
}
+mxShapeArrows2TailedArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
+ var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
+ var dy2 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy2', this.dy2))));
+ var dx2 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
+ var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+ var x2 = 0;
+
+ if (dy2 != 0)
+ {
+ x2 = dx2 + dy2 * (dy2 - dy1) / dy2;
+ }
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h * 0.5 - dy2));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2, h * 0.5 - dy2));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + x2) * 0.5, h * 0.5 - dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h * 0.5 - dy1 - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h * 0.5 + dy2));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2, h * 0.5 + dy2));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + x2) * 0.5, h * 0.5 + dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h * 0.5 + dy1 + arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Tailed Arrow with Notch
//**********************************************************************************************************************************************************
@@ -1799,7 +2205,6 @@ mxShapeArrows2TailedNotchedArrow.prototype.paintVertexShape = function(c, x, y,
var dx2 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
-
var x2 = 0;
if (dy2 != 0)
@@ -1888,6 +2293,36 @@ Graph.handleFactory[mxShapeArrows2TailedNotchedArrow.prototype.cst.TAILED_NOTCHE
return handles;
}
+mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
+ var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
+ var dy2 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy2', this.dy2))));
+ var dx2 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
+ var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+ var x2 = 0;
+
+ if (dy2 != 0)
+ {
+ x2 = dx2 + notch * (dy2 - dy1) / dy2;
+ }
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, notch, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h * 0.5 - dy2));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2, h * 0.5 - dy2));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + x2) * 0.5, h * 0.5 - dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h * 0.5 - dy1 - arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h * 0.5 + dy2));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2, h * 0.5 + dy2));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + x2) * 0.5, h * 0.5 + dy1));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h * 0.5 + dy1 + arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Striped Arrow
//**********************************************************************************************************************************************************
@@ -1954,7 +2389,6 @@ mxShapeArrows2StripedArrow.prototype.paintVertexShape = function(c, x, y, w, h)
c.lineTo(notch * 0.32, dy);
c.close();
c.fillAndStroke();
-
};
mxCellRenderer.registerShape(mxShapeArrows2StripedArrow.prototype.cst.STRIPED_ARROW, mxShapeArrows2StripedArrow);
@@ -1991,6 +2425,27 @@ Graph.handleFactory[mxShapeArrows2StripedArrow.prototype.cst.STRIPED_ARROW] = fu
}
+mxShapeArrows2StripedArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, 0, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, h - dy));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//Jump-In Arrow
//**********************************************************************************************************************************************************
@@ -2084,6 +2539,21 @@ Graph.handleFactory[mxShapeArrows2JumpInArrow.prototype.cst.JUMP_IN_ARROW] = fun
return handles;
}
+mxShapeArrows2JumpInArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, arrowHead * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead));
+
+ return (constr);
+}
+
//**********************************************************************************************************************************************************
//U Turn Arrow
//**********************************************************************************************************************************************************
@@ -2128,9 +2598,7 @@ mxShapeArrows2UTurnArrow.prototype.paintVertexShape = function(c, x, y, w, h)
var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
-
var dx = (h - arrowHead / 2 + dy) / 2;
-
var dx2 = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2)));
c.begin();
@@ -2202,3 +2670,26 @@ Graph.handleFactory[mxShapeArrows2UTurnArrow.prototype.cst.U_TURN_ARROW] = funct
return handles;
}
+mxShapeArrows2UTurnArrow.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+ var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
+ var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
+ var dx = (h - arrowHead / 2 + dy) / 2;
+ var dx2 = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2)));
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, 0));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + dx2, arrowHead * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, arrowHead));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dx + w) * 0.5, h - 2 * dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, Math.max(w, dx), h - 2 * dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, Math.max(w, dx), h - dy));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, Math.max(w, dx), h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dx + w) * 0.5, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h + arrowHead * 0.5 - dy) * 0.5));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead - 2 * dy, (h + arrowHead * 0.5 - dy) * 0.5));
+
+ return (constr);
+}
+